News for hackers. Stuff that matters.
Re:The problem with vim by terhechte on Wednesday August 21, 2013 @02:53AM (#6248609)
Most of these vim emulators are open source, so there's always the chance to just fix it and do a pull request. The main two vim emulators that I am using are:

- XVim for XCode

- Evil for Emacs

And both do a really good job. Evil beats XVim hands down, but XVim is a lot better than the others I tried: IdeaVim (for Intellij), Vrapper (Vim for Eclipse), and Vintage (Vim for Sublime). Out of these, vintage is by far the worst. I think it does more harm than good because the missing and wrongly implemented keys confuse me so much that I get worse at vimming. IdeaVim lacked a lot of the keys that I use regularly important (vi", va", vit, vat, etc), and Vrapper was kinda good but I think I couldn't map jj to <ESC>, but it's been some time since I had to use Eclipse.

I tried to fix IdeaVim, but I browsed the source for some time and couldn't really figure out what to do. However, I also enhanced my local XVim and Evil setups a bit by extending the code and it was a lot easier than with IdeaVim.

I've said this before, but with all these implementations, somebody should have written a "libVim" in lua, that can be embedded in almost any project, and can be hooked into the input stream, and then you'd just need to define a set of methods in your delegate textfield (or what it is) and the libVim will call these methods based on input (i.e. move cursor, insert text at position, change text at position, scroll up, scroll down). I don't think you'd need that many delegate methods since mostly it is writing to a text buffer.

Re:The problem with vim by oftenwrong on Wednesday August 21, 2013 @09:00AM (#6249864)
> "libVim"

I think it would be better for developers to allow their programs to launch external editors. That way users can pick whichever editor they like. All the developer has to do is create a temporary file, run a command to open it, and watch for changes.

(Thanks to vimperator, I am using vim to write this.)

Re:The problem with vim by abjuk on Wednesday August 21, 2013 @12:12PM (#6251327)
Most IDEs let you set a hotkey to run the current file through an external program (I generally use Ctrl-Shift-V to open in Vim) as well as a setting to automatically detect and reload a file that's been changed outside the IDE. It's not perfect integration, but it works pretty well once you're used to the workflow.
Re:The problem with vim by terhechte on Wednesday August 21, 2013 @02:08PM (#6252229)
That would not enable you to use editor features like autocompletion, context awareness, etc. Now, you could also implement them in the external editors, but then you'd be at step one again and re-implement an IDE in vim.
Re:The problem with vim by gradstudent on Saturday August 24, 2013 @06:35AM (#6268268)
Sorry, what? Why do you want "editor features"? vim is the final word in editors.
Re:The problem with vim by tomlu on Wednesday August 21, 2013 @02:02PM (#6252186)
I did a bunch of work for XVim a while back. The owner is really friendly and very welcoming of contributions, so if anyone wants to pitch in you'll find it worthwhile. When I first looked at XVim the code was a little disorganised. It was possible to fix it up with some fairly massive refactorings, and they were all warmly welcomed.

Once I switched to AppCode I thought I'd do the same for IdeaVim, but the code base is such an unholy affront to the gods that I gave that idea up.

Unfortunately, much like the author, my conclusion was to empty out my vimrc and start using a minimal subset that is definitely supported on all platforms. It's a real bummer, but it's definitely better than not using killer vim + IDE combinations.

Re:The problem with vim by ser0 on Wednesday August 21, 2013 @04:49PM (#6253219)
I agree that Vintage is pretty useless.

I would recommend Vintageous[1] which has implemented far more bindings. Although annoyingly, it does not have :w, which I use quite often.

[1] https://github.com/guillermooo/Vintageous

Re:The problem with vim by clintonb11 on Sunday August 25, 2013 @10:38PM (#6274854)
agreed, this plugin is good and getting better.
Re:The problem with vim by morphyn on Wednesday August 21, 2013 @03:34AM (#6248723)
For info, you can map jj to <ESC> in .vrapperrc (or _vrapperrc). Maybe they added that after you tried it.
Re:The problem with vim by zjgreen on Saturday August 31, 2013 @05:35PM (#6308206)
mapping 'jj' to <ESC> was so revolutionary for me lol
Re:The problem with vim by erikb on Wednesday August 21, 2013 @03:57AM (#6248774)
I think it is wrong to say a plugin is not bad, just because you could add the necessary features yourself. You could also write a better plugin, but "ain't nobody got time for dat"!
Re:The problem with vim by AlexanderDhoore on Wednesday August 21, 2013 @06:54AM (#6249275)
I looked at Xvim some time ago and decided not to use it because it seemed abandoned. But apparently they're working on another branch! Good, XCode really needs a vim plugin.
Re:The problem with vim by sesm on Wednesday August 21, 2013 @07:47AM (#6249488)
va" and vi" are now supported in IdeaVim, as well as other i/a commands for ",{,(,[,<. However, tags (vit, vat) are not supported, which is disappointing.
Re:The problem with vim by bambambazooka on Wednesday August 21, 2013 @10:15AM (#6250393)
wow, thanks for Vrapper... this is great!
Re:The problem with vim by SkyMarshal on Wednesday August 21, 2013 @11:24AM (#6250966)
Fwiw, if you find yourself wanting a Vim plugin for just about any piece of software but don't know if it exists or not, just assume it does and google it.
Re:The problem with vim by bambambazooka on Thursday August 22, 2013 @04:34AM (#6255899)
I knew of eclim, which was to much hassle set up for me. Didn't have to use eclipse too much in the last years, but have to come back to it now. This was perfect timing.