4 ms·
Author here: This works using Vim's NetBeans control protocol (inside Vim, do `:help netbeans` to get an overview. Also see the VimSocket class in vim.py) and
by lunixbochs 13y ago
Author here:
This works using Vim's NetBeans control protocol (inside Vim, do `:help netbeans` to get an overview. Also see the VimSocket class in vim.py) and minimal help from a simple VT100 emulator I wrote (found in term.py).
Open the command panel (cmd|ctrl+shift+p) and run the "ActualVim: Monitor TTY" command if you want to see what's going on in the terminal for any open view.
I actually wrote the first Vim emulation mode in Sublime Text a couple years back ( https://github.com/lunixbochs/sublimevim https://github.com/lunixbochs/sublimevim ) that possibly inspired the other similar plugins. I consistently ran into enough unsupported motions with both my own and other plugins that I caved and wrote ActualVim.
- aidos 13y agoReally nice work. I'm happy where I am in vim but if I ever decided to move this looks like the way to go. OT It's funny how conditioned I am to seeing __Beans and instantly dismissing it as something I can't be bothered to look into. Silly biased me; it looks like a really powerful protocol.
- lunixbochs 13y agoI have my share of complaints about the NetBeans protocol. It's actually pretty weird and incomplete, but it's supported by default so I'm using it. I think it's meant to be used the other way - using Vim as your frontend to edit code while using NetBeans to manage the project, lint, compile, etc - but it had enough functionality I was able to barely make it work the other way.
- justinmk 13y ago> NetBeans protocol ... I think it's meant to be used the other way - using Vim as your frontend to edit code while using NetBeans to manage the project eclim[1] is probably an excellent reference-implementation of both approaches. Did you look at it, and if so was it useful? [1] https://github.com/ervandew/eclim https://github.com/ervandew/eclim
- lunixbochs 13y agoIsn't eclim primarily to use Vim as the frontend and Eclipse as the backend? Same idea, slightly different scenario. I used it for linting Java over in sublimelint. I developed ActualVim using only a VT100 reference ( http://bochs.info/text/vt100.txt http://bochs.info/text/vt100.txt ) and `:help netbeans`
- justinmk 13y agoThe core of eclim is a server that talks to the Eclipse JDK, for which there are vim, emacs, etc, front-ends. Eclim also happens to provide an Eclipse plugin that _embeds_ Vim in Eclipse, using the NetBeans protocol, just as you are embedding Vim in Sublime. The author of eclim is also very responsive, if you wanted to ask him about anything.
- lunixbochs 13y agoIs he not just embedding a VT100 emulator and using NetBeans socket to copy the buffer back and forth? The primary focus of NetBeans integration is to pass basic state forth and not to facilitate a full Vim embed.
- justinmk 13y agoTo be honest, I don't know. An eclim discussion[1] implies that eclim is using Vim's NetBeans protocol, and the eclim code that I have read is well-organized and the project is mature, so when you said you were having issues with the NetBeans protocol I thought eclim might be a useful reference for you. [1] https://github.com/ervandew/eclim/issues/100 https://github.com/ervandew/eclim/issues/100
- lunixbochs 13y agoOh, that's awesome. I didn't think of using it like that. They're using a Vim script to extend the NetBeans protocol and pass arbitrary messages back with nbkey/keyCommand. I can totally use this. Thanks!