Re: Integration of Vim
Hi, this topic has been dead for ages already but I ended up finding it by accident due to a related discussion happening elsewhere. So, I'd just like to share NeoVim as a pretty good solution for this, since it was born with embedding in mind, and has been used with success in GUI implementations and for extensions in popular IDEs, breaking barriers and providing novel forms of vi-like modes in other environments. No interest in reviving a debate, this message is just for your information. Cheers -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Integration of Vim
Yeh that is true, It was my first preference because it's an editor that I like, but the overall complexity of integrating it suggest that it'll probably best to start looking at alternatives. I'm still hopeful that the client-server design will work as expected. Cheers -Wynand --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Integration of Vim
It seems that vim is not designed to be an editor component and too advanced to be a game engine script editor. So I suggest another choice - scintilla. Scintilla is a free source code editing component. It comes with complete source code and a license that permits use in any free project or commercial product. Scintilla is writen in C++ and used as editor component in many editors like SciTE, Nodepad++, etc. You can find it on http://www.scintilla.org/ B.G. On 10月11日, 下午2时38分, Wynand <[EMAIL PROTECTED]> wrote: > I wrote a game engine with embedded script engines and would like to > integrate vim as the primary editor for the scripts and other > functions. I googled it for several days now and cant really come up > with anything useful, I also downloaded the source and found it quite > overwhelming at first glance. Is there any documentation on how to > interface with Vim, or any C/C++ libraries that I can use to do so? > i.e libVim or similar? --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Integration of Vim
>Try reading >:help clientserver Finished reading that just now cheers for the pointer. I haven't dug around enough yet to find the --remote-send option in the source yet. I figure that I'll need to dedicate some time for writing some test applications. Shouldn't get to carried away, still have evil evil exams to study for :(. This is pretty simple but still, with --remote-send and --remote-expr you can get some quite advanced "remote control" done. This is starting to look better and better :) --windowid Open Vim inside another win32 widget --socketid Open Vim inside another win32 widget I'm trying to maintain a high level of portability with the engine, so I'm not sure how well a process that relies on retrieving the window handles will integrate into to system in regards to portability and consistency (i.ealgorithmic complexity, performance etc). Cheers Wynand --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Integration of Vim
On 11 Okt., 13:54, "Wynand Marais" <[EMAIL PROTECTED]> wrote: > Wow, Thanks for everyone's feedback :), there are some great ideas on how to > get started. I particularly like the idea of running it as a server. > > > 2) You start the GUI version as Vim-Server. Used by gvimplugin [2]. communication using the --remote options: --remoteEditiere in einem Vim-Server falls möglich --remote-silent Dasselbe ohne Warnung, wenn kein Server vorhanden ist --remote-wait Wie --remote, aber warte, bis die editiert wurden --remote-wait-silent Dasselbe ohne Warnung, wenn kein Server vorhanden ist --remote-tab Wie --remote, aber öffne ein Tab für jede Datei --remote-send Schicke zu einem Vim Server und beende --remote-expr Führe in einem Vim-Server aus und drucke das Ergebnis --serverlist Drucke verfügbare Vim-Server-Namen und beende --servername Benutze den Vim-Server This is pretty simple but still, with --remote-send and --remote-expr you can get some quite advanced "remote control" done. The way it works is first start a server gvim with: gvim --servername "Server Name" --remote-silent "File Name" and then you send command to the server. Of example you can end the server again with: gvim --servername "Server Name" --remote-send ':xa' or the following command will tell you if the file has been modified: gvim --servername "Server Name" --remote-expr '&modified' Since the gvim sending the command won't read any plugins performance is quite ok. > > 3) You start the GUI version as a Netbeans-Server. Used by eeedit [3]. Never used that but it seems quite powerful and with the (only one of them) --windowid Open Vim inside another win32 widget --socketid Open Vim inside another win32 widget you can even embed inside in you application. Martin --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Integration of Vim
> Wow, Thanks for everyone's feedback :), there are some great ideas on > how to get started. I particularly like the idea of running it as a server. > > > 2) You start the GUI version as Vim-Server. Used by gvimplugin [2]. > > 3) You start the GUI version as a Netbeans-Server. Used by eeedit [3]. > > The next question that remains is then how you go about talking to the > server. I started looking at the source code for [3] and it doesn't seem > excessively hard, but I'd rather not count my chickens till they hatched. Try reading :help clientserver for a start. Once you can get Vim itself to do what you need, you should be able to make something else. E.g. find the code that implements the --remote-send option and integrate it into your application. Smiles, Ben. Send instant messages to your online friends http://au.messenger.yahoo.com --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Integration of Vim
Wow, Thanks for everyone's feedback :), there are some great ideas on how to get started. I particularly like the idea of running it as a server. > 2) You start the GUI version as Vim-Server. Used by gvimplugin [2]. > 3) You start the GUI version as a Netbeans-Server. Used by eeedit [3]. The next question that remains is then how you go about talking to the server. I started looking at the source code for [3] and it doesn't seem excessively hard, but I'd rather not count my chickens till they hatched. -Wynand On 10/11/07, krischik <[EMAIL PROTECTED]> wrote: > > > On 11 Okt., 08:38, Wynand <[EMAIL PROTECTED]> wrote: > > Hi > > > > I hope this is the right discussion board for the question. > > > > I wrote a game engine with embedded script engines and would like to > > integrate vim as the primary editor for the scripts and other > > functions. I googled it for several days now and cant really come up > > with anything useful, I also downloaded the source and found it quite > > overwhelming at first glance. Is there any documentation on how to > > interface with Vim, or any C/C++ libraries that I can use to do so? > > i.e libVim or similar? > > > > This is meant to run inside a virtual console (like the quake console) > > which receive all IO events primarily including mouse and keyboard > > events. > > > > Any help would be greatly appreciated as I have no idea where to > > start. > > Vim is usually integrated by starting a Vim and "remote control" it. > The following options are open: > > 1) You start the console version inside a terminal emulator. Used by > vimplugin [1]. > 2) You start the GUI version as Vim-Server. Used by gvimplugin [2]. > 3) You start the GUI version as a Netbeans-Server. Used by eeedit [3]. > > Note that the 3 projects mentioned currently merge - with eeedit / > Netbeans as base. It can just do the coolest stuff - just look at the > screen shot: > > http://code.google.com/p/eeedit/wiki/ScreenShots > > Martin > > [vimplugin]: http://vimplugin.sourceforge.net/wiki/pmwiki.php > [gvimplugin]: > http://vimplugin.svn.sourceforge.net/viewvc/vimplugin/branches/gvimplugin/ > [eeedit]: http://code.google.com/p/eeedit/ > > > > > > --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Integration of Vim
On 11 Okt., 08:38, Wynand <[EMAIL PROTECTED]> wrote: > Hi > > I hope this is the right discussion board for the question. > > I wrote a game engine with embedded script engines and would like to > integrate vim as the primary editor for the scripts and other > functions. I googled it for several days now and cant really come up > with anything useful, I also downloaded the source and found it quite > overwhelming at first glance. Is there any documentation on how to > interface with Vim, or any C/C++ libraries that I can use to do so? > i.e libVim or similar? > > This is meant to run inside a virtual console (like the quake console) > which receive all IO events primarily including mouse and keyboard > events. > > Any help would be greatly appreciated as I have no idea where to > start. Vim is usually integrated by starting a Vim and "remote control" it. The following options are open: 1) You start the console version inside a terminal emulator. Used by vimplugin [1]. 2) You start the GUI version as Vim-Server. Used by gvimplugin [2]. 3) You start the GUI version as a Netbeans-Server. Used by eeedit [3]. Note that the 3 projects mentioned currently merge - with eeedit / Netbeans as base. It can just do the coolest stuff - just look at the screen shot: http://code.google.com/p/eeedit/wiki/ScreenShots Martin [vimplugin]: http://vimplugin.sourceforge.net/wiki/pmwiki.php [gvimplugin]: http://vimplugin.svn.sourceforge.net/viewvc/vimplugin/branches/gvimplugin/ [eeedit]: http://code.google.com/p/eeedit/ --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Integration of Vim
I have a similar interest. I want to integrate vim with a smalltalk environment. I have also looked into vim's codebase. Where to start? It seems like that it would be very useful to have: A way to have a buffer that is async linked to a source that is not a file, but behaves like one. And A way to send async messages. There are so many ways to do that, e.g. via a tmp file, via pipes. I favor tcp. It seems like this vimshell and slim-vim (recently somewhat deceased) would benefit from the addition of something like this to vim as well. If I had any idea where to start, I would have already. Is there a "heartbeat" like cursor flashing, off of which this could piggy-back? I would really love to be able to extend this async treatment to all of the scripting interpreters that vim already supports. If there were a clean way to do this, vim could have a slime-like env for 6 different languages rather quickly. And that would be cool. On Oct 11, 2007, at 2:38 AM, Wynand wrote: > > Hi > > I hope this is the right discussion board for the question. > > I wrote a game engine with embedded script engines and would like to > integrate vim as the primary editor for the scripts and other > functions. I googled it for several days now and cant really come up > with anything useful, I also downloaded the source and found it quite > overwhelming at first glance. Is there any documentation on how to > interface with Vim, or any C/C++ libraries that I can use to do so? > i.e libVim or similar? > > This is meant to run inside a virtual console (like the quake console) > which receive all IO events primarily including mouse and keyboard > events. > > Any help would be greatly appreciated as I have no idea where to > start. > > Thanks > Wynand > > > > --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Integration of Vim
Hi Wynand, > This is meant to run inside a virtual console (like the quake console) > which receive all IO events primarily including mouse and keyboard > events. > > Any help would be greatly appreciated as I have no idea where to > start. this is not easily possible, there's no libVim. And even if you're willing to modify vim's source, it will be a lot of work because vim insists on "owning" the main loop (ie, code execution sits in vim and it just calls its gui parts every now and then). This is not what you want when you're writing a game. One thing you could try would be running vim in a separate process and talk to it via IPC. To do this, you could add a new GUI to vim which does nothing but forward drawing commands etc to your app and receives key input commands from your app. MacVim takes this approach, you can take a look at it's modifications to vim's source for some ideas ( http://code.google.com/p/macvim/ ). Short overview: MacVim/gui_macvim.m implements the gui functions vim is going to call and forwards them to a MMBackend, which uses OS X' IPC mechanism to send them to another process. Apart from that, you only need to look at the required modifications to vim's core (macvim-*-patch.tar.gz in the downloads section). But it's still a lot of work. Sorry for the bad news :-| Nico --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Integration of Vim
Hi I hope this is the right discussion board for the question. I wrote a game engine with embedded script engines and would like to integrate vim as the primary editor for the scripts and other functions. I googled it for several days now and cant really come up with anything useful, I also downloaded the source and found it quite overwhelming at first glance. Is there any documentation on how to interface with Vim, or any C/C++ libraries that I can use to do so? i.e libVim or similar? This is meant to run inside a virtual console (like the quake console) which receive all IO events primarily including mouse and keyboard events. Any help would be greatly appreciated as I have no idea where to start. Thanks Wynand --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---