Vi Keybindings for Eclipse?

I love Vi and Eclipse for very different reasons. Eclipse is a kick-ass Java IDE, and vim is possibly the best text editor out there. I wish I could combine both applications into one – giving me both the convenience of an IDE and the raw editing power of vi. Komodo Edit which I reviewed recently comes very close to what I want. It essentially aims to emulate vi behavior inside it’s own editor. This has both advantages and disadvantages.

Main advantage is that you can still use the IDE’s advanced features such as tool-tips, auto complete, code folding, bookmarks and etc. Downside is that few more obscure and advanced vi features simply won’t work. I’m perfectly fine with that compromise, and working in Komodo Edit has made me more productive than ever.

I would love to have the same functionality in Eclipse so that I can totally kick ass when I code Java as well! Unfortunately, I have yet to find a solution that could even remotely compare with what Komodo did to my PHP coding environment.

There is a plugin out there which does exactly what I want – it’s called viPlugin. It integrates with Eclipse and seamlessly emulates VI editing patters exactly like Komodo does. Unfortunately it’s not free. The pleasure of using this plugin will cost you $20. The author offers a free trial version, which is essentially unusable – it pops up a modal, focus stealing dialog that nags you to buy a full version every 3 minutes or so.

Let me recap this for you: this is a plugin, which adds a non-essential set of features to a completely free IDE. Who in their right mind would pay $20 for a plugin to a free product? I certainly don’t need these key bindings that badly! If the price was less steep and the nag-dialog was less annoying I would seriously consider spending few bucks on it. Hell, I’d even consider donating few bucks to this guy if I would find myself using the plugin extensively.

But that dialog is just rude, and inconsiderate. It’s like the author is so afraid that someone might actually use his app without paying he will go to great lengths to make trail version unusable, and downright annoying. I hate this way of thinking – it makes you look like a greedy asshole who doesn’t give a shit about end user experience.

In clear conscience I can’t support this sort of behavior. So viPlugin lost me as a customer. Too bad, because this was really what I was looking for.

No one else seems to be working on this sort of project. There are several Vim/Eclipse mashups out there, but none of them seems to actually provide Komodo like experience.

For example Vimplugin is an Open Source project that actually lets you use a full blown vim instance inside the IDE. They accomplish this by using the JTA terminal emulator. You provide your own command line version of vim, and it will get loaded as a tab in Eclipse interface.

Upside of this is that you get a full blown version of vim, configured the way you like it. Downside is that you loose most of the cool Eclipse features such as folding, tooltips, auto complete and etc… I tried the plugin and it works fiine. It’s just not what I was looking for. I might as well launch vi by itself in a separate window for the same effect.

Eclim project does something completely opposite from Komodo. Instead of trying to bring Vim key-bindings into an advanced IDE, it tries to bring the IDE features into Vim. I haven’t tested it, but it looks intriguing. You get code completion, inline error checking and all that good stuff directly in your Vim window. I’m not sure if all the Eclipse features can work this way. For example, I can’t imagine how would they implement the built in Eclipse debugger this way.

I also found a project dubbed Viclipse on sourceforge. It seems to be very similar to the viPlugin in scope, but it is in a very early development stage. It also seems abandoned – no one has checked any code into the CVS in a year.

I guess I’ll have to code without vi key-bindings in Eclipse. Unless of course you can point me to a better solution than the ones I listed here.

Update 01/15/2008 10:11:33 AM

In retrospect I think that I might have been a little harsh on ViPlugin. Who am I to tell people what they can or cannot charge for their work? Michael – the author of the plugin was nice enough to stop by and tell us why he chose to make it proprietary. See the comments for his take on this. He seems to be a really nice guy, and he is being a good sport about this whole rant here so I say he is off the hook. ;)

[tags]vi, vim, eclipse, viPlugin, viclipse, eclim, vimplugin, eclipse plugins, java[/tags]

This entry was posted in technology. Bookmark the permalink.

33 Responses to Vi Keybindings for Eclipse?

  1. Mats Rauhala FINLAND Mozilla Firefox Windows says:

    Vim supports at least folding and auto-completion. Why not check it out? :)

    Reply  |  Quote
  2. Luke UNITED STATES Mozilla Firefox Windows says:

    Yes it does. But it does not compile the code as I type. It also does not underline syntax errors. It does not pop up helpful tool-tip explanations that remind me what types does a given method take.

    It also can’t automatically generate import statements for the classes I use, add exception handling code where necessary and etc… Eclipse really does make your life easier. It saves a lot of typing – more typing than vi ever could. But vi mode is more efficient at editing text rapidly.

    Reply  |  Quote
  3. Luke UNITED STATES Mozilla Firefox Windows says:

    Swaroop – that blog is actually talking about vimplugin which I described above (9th paragraph from top I think). Thanks anyway.

    Reply  |  Quote
  4. John Quillen UNITED STATES Mozilla Firefox Windows says:

    (grr. The anti-spam word wasn’t legible and my original post got eaten. I’ll copy this one before hitting Post)
    The plugin is worth the money to me. If it’s not to you, that’s ok, too. I understand your gripe – it feels like someone is profiting on the back of someone else – I guess that’s why GPL is so restrictive. But it’s a free market; the producer has to set a price and consumers assess the value.

    Reply  |  Quote
  5. Elias Pipping GERMANY Safari Mac OS says:

    I’ve just had a look at viPlugin myself (came across this entry, googling for vi key binding eclipse or something). I agree with everything you say, and I’d like to add that I find its feature set hilarious. It does not even support ctrl-u / ctrl-d. that plugin is an incredibly bad joke. (and so is called it version 1.x)

    Reply  |  Quote
  6. Rex UNITED STATES Mozilla Firefox Windows says:

    $20 for the comfort of familiar key bindings is more than justified in my view. Don’t you believe in supporting fellow hackers?

    Reply  |  Quote
  7. Steve UNITED STATES Mozilla Firefox Windows says:

    Elias, pretty strong words. If you agree with everything Luke says, then I guess you agree that “There is a plugin out there which does exactly what I want – it’s called viPlugin. ” Hardly the same as calling ti a bad joke. Luke’s objection was related to the creator’s *policies*, not the technical merits of the plugin. You complain that it doesn’t react to ctrl-u / ctrl-d. I tried them and they work fine. I suspect you didn’t enable the vim control key bindings, a task that the FAQ and other documentation tells you how to do. If you can’t find the doc, he even made a little screencast at htm

    Anyway, I tried it out Friday. Being a 20-year user of vi and a 3-day user of eclipse, I really needed it. The $20 cost was worth it to me and I’m now a happy customer.

    I am, however, sympathetic to your criticisms, Luke. The creator has presumably benefited greatly from his personal (and professional?) use of open software … like eclipse for example. A little give-back would not only be considerate to programmers everywhere who have donated their own efforts, it is *required* to keep the wheel of open software turning. It tastes a lot like taking unfair advantage of the generosity of others.

    Of course, that’s easy for me to say. I am, shall we say, a highly-compensated software developer. I was able to drop the $20+ without noticing it. Anything under $100 is basically free, from my point of view. Heck, I’m not even going to bother filling out the paperwork to get reimbursed by my employer. The fact that he is making fairly frequent releases fixing bugs and adding new features means that much more – for me, that alone is worth the money.

    When I was fresh out of school, it was a bit different. I could easily see my 1980 self wanting to make a bit of money off my efforts.

    I don’t know the creator’s circumstances. Maybe he is also a highly-compensated guy who’s just greedy and wants to pry a few extra coins from the pockets of poor programmers. I’m willing to give him the benefit of the doubt though, and assume that he’s a poor student or new graduate who is facing a few years of paying off loans before he can drop $20 without blinking. I hope that he eventually *does* give something back to the community, possibly even by making viplugin open source in a year.

    Reply  |  Quote
  8. Steve UNITED STATES Mozilla Firefox Windows says:

    P.S. – Luke, I do thank you for your post. Even if I don’t agree with one of your conclusions (“In clear conscience I can’t support this sort of behavior.”), it helped inform me and gave me food for thought.

    Reply  |  Quote
  9. Luke Maciak UNITED STATES Mozilla Firefox Windows Terminalist says:

    @Steve – You do make a very good point. I guess being a staunch open source enthusiast and an idealist I sometimes find it hard to look at proprietary software and not consider it a ripoff. :P

    For me the plugin was more of a novelty factor – something nice to have, but not absolutely essential and so not really worth $20. But you are right, it’s really not a lot of money if you think about it and it might be worth if you factor in the productivity gain. Thanks for the alternative point of view. :)

    Reply  |  Quote
  10. Elias Pipping GERMANY Safari Mac OS says:

    I was pretty mad at that plugin over its don’t-try-to-persuade-the-customer-this-is-a-good-deal-but-get-on-his- nerves-till-he-gives-in attitude back when I wrote that comment. I might have been a little harsh, and — if you say so — even wrong, in which case I apologize.

    Reply  |  Quote
  11. Steve UNITED STATES Mozilla Firefox Windows says:

    Elias, it’s strange, I didn’t find the nag dialog nearly as annoying as you guys did. Like you, I would have much preferred that it be open source, or at least tip-ware (I probably would have donated more than $20). But given the model he chose I guess I felt that I was able to effectively evaluate it, which basically meant making sure it performed the subset of vim functions that I use all the time. I already knew that a reasonable vi emulator would improve my productivity, so I just needed to know it was reasonable.

    However, now that you emphasize it, I can see the point that the 30-second nag can completely disrupt an evaluation if the point of the evaluation is to see *IF* the plugin would in fact improve your productivity. Just when you get on a roll of editing, up pops the stupid nag, ruining your train of thought, sending your editing productivity into the toilet.

    So not only is a 30-second nag an annoying and somewhat insulting choice, it’s actually a bad business choice. Now that I’m a paid-up customer, maybe I’ll suggest that he change it to a 30 minute nag.

    Reply  |  Quote
  12. Steve UNITED STATES Mozilla Firefox Windows says:

    Here’s a test I just came up with to see if viPlugin is worth the cost to you. Given the line:

    if (condition) { part1; part2; }

    Let’s say the cursor is on the “i” of the “if” and your task is to replace the “{ part1; part2; }” with “funct1();”. How would you do it in vi without the mouse?

    If your answer is to press right arrow a bunch of times, followed by “x” a bunch more times, then I think viPlugin would be a waste of money.

    However, if your answer is “f{cf}funct1();” and you would do that almost without thinking in under a second without taking your eyes off the screen, then you would definitely benefit from a good vi emulator.

    Sorry if I’m dragging this conversation out longer than it deserves. I’m really not on viPlugin’s payroll, honest! I’ll stop now. :-)

    Reply  |  Quote
  13. Hi all,

    I’m the developer of viPlugin and wanted to add something to this conversation ;-)

    – I’ve worked on the plugin for more than 3 years in my free time now. This is a lot of free time and when I had financial troubles I took the opportunity and made viPlugin a commercial product.

    – On occasions I’ve given the plugin away for free, to developers that couldn’t afford it. This was mainly around X-mas every year. I’ve reduced the price not long ago to celebrate the birth of my daughter. Calling me greedy is a bit harsh :-)

    – The nag screen is only there because I’m really bad when it comes to security. I just don’t have a clue how to protect it so this was my first idea and it turned out to be a bad one. I wanted to make it 30 day useable without restrictions, but never came around to do it. Perhaps I should give it a try…

    – The original price was 15 Euro (was 15 Dollar) but the exchange rate Euro – Dollar got bad for the Dollar. Don’t blame me for that!

    – I too think that I owe the open source community. You can find my name mentioned in some open source projects like FreeLords, KDE, Python, … I think I do my share of giving back!

    Have fun,

    Reply  |  Quote
  14. Luke Maciak UNITED STATES Mozilla Firefox Ubuntu Linux Terminalist says:

    @Michael – thanks for stopping by! As you can see quite a few people in this thread do use your plugin and find it worth the price. Don’t feel that you need to defend your choice to charge for your work just because an old open source curmudgeon was annoyed at it at the time.

    I’m thrilled you can make money of this and I’m glad you are thinking about removing the nag-screen. :)

    Anyways, don’t pay attention to my rant. At the time I wrote this I was probably in a bad mood to begin with and looked at few dozen similar but free products, neither of which matched yours in functionality and somehow got myself touting the “proprietary is evil” rant. :P

    I’m not sure how I went from – “neat idea, but at $20 I think I’ll pass” to “OMG, this is such a ripofff!” lol Sorry if I scared some of your potential customers, and I hope there is no hard feelings.

    Reply  |  Quote
  15. Hi again,

    Thank you very much for the clarification, altough I had no hard feelings anyway :-) I think I was just in the mood to tell the people that I’m not that bad a guy at all (at least I hope).

    I don’t believe that this blog scared off some customers, their probably scared enough by the nag-screen. It’s time to think about a solution to this problem. At first I wanted a 30-days-no-restrictions solution anyway, but didn’t know how to implement it elegantly. I will have another look at that now – blogging can change the world ;-)!

    Have fun,

    Reply  |  Quote
  16. Chris Beams UNITED STATES Camino Mac OS says:

    I love telling fellow developers that ViPlugin is “the best 15 euro I ever spent”. I’ve used it for years now, and Michael (the author) has always been responsive and friendly.

    The amount of satisfaction, pleasure and productivity I’ve gotten from the product far outweighs the paltry amount I paid. Furthermore, it delights me to no end to think that in doing so, I’ve helped support an independent developer doing what he loves AND making money at it.

    P.S.: @Elias – viPlugin does indeed support ctrl-u / ctrl-d. Simply enable the ViPlugin scheme in Preferences->General->Keys.

    Reply  |  Quote
  17. Ironically enough, it was the rant on this site (or rather, Michael’s rebuttal thereof) that made me decide to put down the cash for this plugin.

    That exchange rate’s getting a bit rough though…

    Reply  |  Quote
  18. Ken Collins UNITED STATES Mozilla Firefox Linux says:

    I’ve been using viPlugin since the beginning, when it was open source, and my only complaint is that Michael doesn’t update it very often. If it was open source, someone with more time could take it over and continue adding features. I contributed back when I had the chance.

    Reply  |  Quote
  19. Brandon Atkinson UNITED STATES Mozilla Firefox Windows says:

    I’ve been a paying customer, using viPlugin for over a year.

    My take:

    Expensive given the U.S. exchange rate, but I use it every day. I couldn’t stomach taking my hands off the home row all the time.

    As I see it, it isn’t the money issue which is problematic, it’s the fact that I can’t submit patches for things which are broken. Since I rely on this plugin every day, I’d certainly look into fixing the nasty bugs that seem to creep in every time I’ve upgraded. In other words, I’m frustrated that I can’t fix my own problems with respect to the viPlugin.

    That said, I would be using netbeans and jVi if it wasn’t for viPlugin.

    Reply  |  Quote
  20. cys ROMANIA Opera Windows says:

    Why not try another IDE which already has a free good vim plugin. jVi and Netbeans are great together!
    I was kind of disappointed when I found out Eclipse doesn’t have a working free vim plugin.

    Reply  |  Quote
  21. Steve UNITED STATES Safari Mac OS says:

    @cys – in my case, I was using Eclipse as a C-language IDE.

    Also Brandon (above) says that if it weren’t for viPlugin he *would* be using netbeans and jVi. Although I have no experience in this, it suggests that there may be advantages of Eclipse+viPlugin which are not present with Netbeans+jVi. Anybody out there who have used both?

    Reply  |  Quote
  22. I was using a similar solution until I found viPlugin. The problem with any solution that puts Vi in slave mode is that while you’re using a feature-complete Vi in your IDE, you’re going to have to manually add support for any special IDE features or do without them. Adding a Vi mode to an IDE, on the other hand, preserves those juicy IDE features at the cost of adding a rather complex bunch of editor code to the IDE. Vi is less of a moving target than most IDEs in terms of features, however.
    Michael Hutchinson, a guy on the MonoDevelop project, has a bit to say about this:

    Reply  |  Quote
  23. Adam Jorgensen Opera Linux says:

    jVi for NetBeans is an example of what viPlugin for Eclipse could be:

    Great VIM features in a fully-blown IDE with NO nagging or registration required.

    Reply  |  Quote
  24. Anil UNITED STATES Mozilla Firefox Windows says:

    Take a look at vrapper:

    Works within Eclipse like viPlugin, but is much more functional and
    robust. Marking, mapping keys, visual mode etc. all work. Not a complete replacement for gvim, but much better integrated with Eclipse than gvim/eclim. You get all of Eclipse functionality plus excellent vi editing capabilities.

    Like the previous poster, i too love jVi for Netbeans. So far, i’m finding
    vrapper to be the “jVi for Eclipse”.

    And it’s free.

    Reply  |  Quote
  25. Ken Collins Mozilla Firefox Ubuntu Linux says:

    Vrapper is impressive. Here are some of the features it has that viPlugin is lacking:

    1. Integrated visual selection. ViPlugin’s select is a separate mode from Eclipse selection, and the two are not always compatible.

    2. Macro recording.

    3. Key remapping.

    4. Mapping “:” commands to Eclipse commands.

    5. Marks. In viPlugin, marks show up as bookmarks, and my projects end up littered with useless bookmarks. In vrapper, marks don’t pollute your bookmarks.

    The only thing I’ve noticed that vrapper lacks relative to viPlugin is regex replace commands. These never worked particularly well with selections in viPlugin, so I can’t say I miss them.

    Reply  |  Quote
  26. Brian UNITED STATES Mozilla Firefox Ubuntu Linux says:

    @ Ken Collins:

    Vrapper sounds like what I am looking for, however its software site (i.e. the URL that you provide Eclipse to download the software and look for updates) appears to be missing some components. When I try to install Vrapper from this site, Eclipse is not able to find any software.

    I realize that this is probably not the right forum do discuss Vrapper, since it is the comments section for an article on viPlugin! However, some of you seem to be reporting success with it. How did you install the Vrapper plugin?


    Reply  |  Quote
  27. Brian,

    before the latest release, the items in the Vrapper update site were uncategorized. Newer Eclipse versions only show categorized items by default. You have to click a checkbox to display uncategorized stuff.

    Since the latest release (0.14.0) the update site uses a category so this should not be an issue for new users anymore.

    Reply  |  Quote
  28. Blake Miller UNITED STATES Mozilla Firefox SuSE Linux says:


    Vrapper is awesome. I am giddy with excitement.

    I’m a long time vim user, just started using Eclipse for Java and I’m digging the nice IDE features.. however the pain of trying to edit text with arrow keys or mouse was just too much to bear. This alone far outweighs all the nice Eclipse features for my two cents … I’m one of the ppl in the latter category of Steve’s example.

    Found this page very helpful, thanks to all of the posters.

    In particular, Brandon said “As I see it, it isn’t the money issue which is problematic, it’s the fact that I can’t submit patches for things which are broken. ” and I could not agree more. I would have paid $20 for this functionality without question! But I can contribute to Vrapper and there the contest ends … period.

    Note to the author of viPlugin:
    If viPlugin were open source and I thought it had better functionality than Vrapper (I have never used viPlugin) I would most definitely have thrown down $20 or more for it. It will probably save me that much in the first couple hours of using it. I think I am a typical member of your target audience for this product … maybe you should rethink the license? Perhaps a moot point now, I think your target audience will probably prefer Vrapper.

    Thanks everyone for this excellent page.

    Reply  |  Quote
  29. Michael Bartl Mozilla Firefox Windows says:


    Just wanted to comment on the last part. You get access to a read-only svn repository if you have bought a license for the viPlugin. So you can submit patches whenever you want ;-)

    Best regards,
    Michael Bartl

    Reply  |  Quote
  30. Matt CANADA Google Chrome Linux says:

    You could try , it seems to be active and it provides a lot of the functionality you are looking for and a lot of extras. It is pay though.

    Reply  |  Quote
  31. Running a headed Eclipse + vim inside of it is essentially a “best of both worlds” for people who really need the Eclipse GUI but prefer the power of vim. I personally prefer to run a headless (no gui) eclipse that simply communicates with vim, a much slimmer solution.

    I would recommend checking out a headed Eclipse/eclim before spending cash on a plugin that should have been open sourced in the first place. The logical and cultural contradictions in making a proprietary vi plugin for Eclipse is mind boggling especially considering the other options.

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *