64

Has anyone managed to get Vim integrated into Eclipse painlessly? I just want to use Vim for the editor while retaining the general Eclipse interface. I have tried using Eclim plugin but the editor seemed to crash more often than work (the site said that the editor replacement functionality is still beta).

On the flip side, is there any IDE which matches Eclipse's functionality—mainly the integration with SVN, ant, etc.—and is also able to use Vim?

I mostly use eclipse for SAS SCL, Java and Javascript programming and find the eclipse editor too "mouse-y".

I'd also like, in a perfect world, to use vimdiff as a diff viewer for SVN (we use TortoiseSVN) while checking for diffs or conflicts during merge etc. I admit I havent spent a lot of time trying to get these things to work. I feel guilty about spending too much time on potential wild-goose-chases while my other team members are working away at their code, perfectly content with all that Eclipse has to offer.

Edit: Just found this while desperately browsing around: Vim plugin. Any experience using this? From the claims on the site, it sounds perfect.

Brent Worden
  • 10,624
  • 7
  • 52
  • 57
Adnan
  • 2,949
  • 4
  • 29
  • 45

10 Answers10

29

I've been using Vrapper for about 2 months and it works great. It is simple to install, and makes life much easier.

It doesn't integrate Vim with Eclipse, it just emulates Vim's behaviour so you don't need to have Vim installed.

EDIT:

I have been experiencing errors while refactoring methods in Eclipse (only when Vrapper was installed) so I stopped using it.

Now I'm using ViPlugin (very similar to vrapper). It works great (especially since version 2.0) and I recommend it, but it is not free (but cheap and has a trial version)

Edit

As the new post mentioned, if we always use the rename dialog to rename, it can be a work around for Varpper.

Preferences > Java > and uncheck "Rename in editor without dialog"

http://sourceforge.net/apps/trac/vrapper/ticket/96

Maehler
  • 6,111
  • 1
  • 41
  • 46
Krzysztof Kot
  • 648
  • 1
  • 10
  • 15
13

The consensus seems summarized in that Wanted: VIM in Eclipse article.

No decent Vi plugin exists for eclipse, except viplugin which does not offer macro mechanisms.

vi

Whereas on the NetBeans side... jvi does a killing job ;)

alt text

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
8

WOW, this is the one!

http://vrapper.sourceforge.net/home/

It just came out a few months ago, and seems much better than the other alternatives...and it is open source.

user365076
  • 81
  • 1
  • 1
  • 1
    version 0.14.0, planned for future versions: "Search with support for regular expressions, Search / Replace with ":%s/..." or similar"... bummer – OutputLogic May 12 '11 at 04:54
3

I use Viable, which is a new plugin for Eclipse providing Vi emulation. It is very similar to vrapper, but it doesn't have the same problem as vrapper with refactoring (as cysiek10 described.)

It's got some pretty cool features which none of the other Vim emulators in Eclipse seem to have (though jvi for NetBeans has a few of these) such as:

  • Visual block mode
  • External filters and commands
  • Command history
  • Window splits (love having this one!)

It is pay; however, you can try the full version for free just like viPlugin.

Pang
  • 9,564
  • 146
  • 81
  • 122
ldog
  • 11,707
  • 10
  • 54
  • 70
  • I've been using it since October and find it pretty lacking. Plus not much support -- no response on the forum to a simple question. Not worth paying for imo. – Jeb Jan 04 '12 at 16:07
  • Yea it's a judgement call, most of these plugins I have tried all were found lacking, some more than others. – ldog Jan 04 '12 at 19:11
  • What's your favorite? Do you still use Viable? – Jeb Jan 05 '12 at 18:55
  • 1
    It's no longer a *viable* option, as the developer's website has gone down. – orluke Feb 05 '13 at 18:25
2

I never had much luck with vim integration into any IDE, be it Eclipse, Visual Studio, NetBeans, or sth else. Instead when stuck using an IDE, I just make the IDE launch a custom program: which passes the file onto vim using the client/server feature.

I.e. vim --servername SomeName --remote-{choice of how to open it: splits or tabs} {extra args like filename and +line#}

TerryP
  • 1,072
  • 1
  • 8
  • 13
2

I just tried Eclim http://eclim.org/ and found it really good. I can still edit inside Vim, and enjoy most of the benefits of the eclipse IDE inside Vim (such as better omni completions).

The best thing about Eclim is we are still using the original Vim, so I can enjoy all the existing benefits (my own functions, macros, etc.) while having the extra convenience provided by an IDE.

ArriveW
  • 21
  • 2
1

I tried Eclim and didn't like it at all. I ended using this plugin called "viPlugin," which actually works well enough to warrant using it every day. Here is the site for viPlugin:

http://www.viplugin.com

The big downside of this plugin is that it's not free. I paid for it, and I think it's worth it.

Andy White
  • 86,444
  • 48
  • 176
  • 211
  • I'd heard about viplugin, but haven't tried it. From what I heard, it only mimics vim (allows some vim like commands), but doesn't offer full vim functionality (macros, etc.).. is that true? – Adnan Feb 28 '09 at 00:07
  • I'm actually not sure about macros and more advanced vim functionality. What types of macros are you wanting to use? I sort of recall a way to mimic a .vimrc with viPlugin, but maybe I'm confusing it with ViEmu. Maybe check out the guy's site and see if he has any docs, I can't remember. :) – Andy White Feb 28 '09 at 00:12
  • Im very used to writing ad hoc macros that do complicated things like: map z 0ifoo^[3wibar^[wdwdwcwchange^[Ablah blah^[3j (for example to modify every 4th line in a file in some weird way) – Adnan Feb 28 '09 at 00:31
  • Hmm... I'm not sure, I'll have to try it out. I'll let you know if it supports map and similar stuff – Andy White Feb 28 '09 at 02:30
  • Fixed the link. This post was from years ago, he must have changed it. I actually haven't used viplugin in years, so I'm not sure if my answer is still valid, but it appears that he is still actively working on it. – Andy White Mar 11 '13 at 17:28
1

http://vimplugin.org, which I found over the weekend was the closest I could come to a nice integration. Unfortunately when I opened more than 2 files in my IDE, it made my entire workstation unresponsive. And I didn't even use the "new process" option for the editor.

So bottom line it does seem that there is no decent integration available yet. Although with some it's close. I'm rooting for vimplugin to stabilize and I'll also some time (when I'm not eating up my employer's time like now) play some more with hte plugin to see if I can make it usable.

Adnan
  • 2,949
  • 4
  • 29
  • 45
  • The problem about vimplugin is that you can't use eclipse completion, refactoring and so forth :-(. That make vimplugin useless for me. – Johannes Weiss Mar 04 '09 at 16:55
0

Vrapper does the trick.

After installing Vrapper you need to remove CTRL+W key binding in Eclipse settings. Or else it keeps closing the editor when you actually meant Backspace.

It also comes with "surround" and split window plugins. Be sure to install those.

This is not 100% Vim, though. And nothing is 100% Vim except for Vim (doh!). You will find some commands missing (or you may not, depending on how "vimy" you are). But vrapper has :vim command, which opens up Vim editor with the current file in the buffer and places your cursor in the exact location in the file. This way you can continue editing from where you left off. When you're done in Vim just close the editor, and you return to your eclipse editor.

I hope this was helpful.

sherzodr
  • 101
  • 1
  • 4
0

...is there any IDE which matches Eclipse's functionality -- mainly the integration with SVN, ant, etc. -- and is also able to use Vim?

IntelliJ IDEA has a very good VI plugin, but I didn't like it, although the plugin did it's work.

My problem was I have formed habits to use IDEA and those were harder and my experiment didn't it through. So I uninstall the plugin, and learned idea shortcuts instead.

But, is not free :(

OscarRyz
  • 196,001
  • 113
  • 385
  • 569