views:

1720

answers:

9

At present I am using eclipse for JAVA project. I always wanted to use VIM for my project. Is there any good resource or tutorial that can help me?

+3  A: 

Any particular reason for this other than a burning desire to try vim? I'm not trying to stop you, just curious.

It may be easier to transition via this (or similar) Eclipse plugin. This way you'll learn many of the keybindings before you fire up the real VIM and can't even figure out how to edit or delete text.

I'm not a vim expert as I only use it to edit system configuration on aging linux/solaris servers, but are you really sure you want to do this? Eclipse offers MANY very useful tools that either don't exist or will require scripting / configuration of vim. Eclipse has some really nice refactoring support, syntax based searching, and integrated Ant support to name just a few features.

vim Experts: Can vim refactor Java code? Can vim shell/run things?

basszero
Vim is fully capable of refactoring code in any language. Also, whilst the Eclipse plugin is worth trying out, it does not provide many of the advantages of Vim over Eclipse.
seanhodges
I have been using Eclipse for a long time and I want to try it for Java. I saw people using vim for c++.
Techmaddy
+7  A: 

IMHO, the built-in tutorial of vim is a very good start. I started from there and got used to the basic key bindings within a few hours. After that, it's a matter of experience and constant learning from online articles, blogs, watching-over-the-shoulder, etc., and ultimately the built-in :help command.

PolyThinker
Absolutely agree, same with me.
Ray Hidayat
+1 The built-in tutorial should be the first stop.
Jeremy Cantrell
+1  A: 

There are a number of good articles in Vincent Liu's blog.

You could also try Eclim, which will bring some of Eclipse's more advanced features into Vim.

You should go through the on-line tutorial in Vim first if you haven't done already. It's usually bundled with Vim as a program called "vimtutor". This will help you get the hang of the basics of Vim before you start developing in it.

seanhodges
+6  A: 

Some I have among my bookmarks:

c",)

Svish
Thank for sharing the links. +1 from my side.
Techmaddy
+14  A: 

I was a vim diehard for years (and still am). However I finally succumbed to the lure of Eclipse, and I wouldn't look back (I've had to make a sideways move to Intellij, but that's another story).

Having said that, I run Eclipse with this Vim plugin (note: others available), and that works very well. I keep the keyboard-based power of Vi/Vim, and get the Java-aware capabilities of Eclipse. I would strongly recommend this approach. Despite Vim's multitude of plugins, nothing comes close to the language-aware refactoring and coding capabilities of the modern IDE.

Update: 20/03/2009. This plugin has moved to http://www.viplugin.com/viplugin

Brian Agnew
+1 I am no diehard user of vim, but I think for any project larger then some small trivial application, the capabilities that a full blown IDE can offer over vim are very useful.
Daan
My project is very large, I'll once try using Vim plugin as you have suggested.
Techmaddy
+5  A: 

As someone who has used vi/vim for the better part of two decades, and who still does for many things, I can tell you that once I "got" Eclipse I've never gone back to using vi/vim for non-trivial Java work. While there are still a few things that vi/vim do in a way that I find more natural and productive (probably due to that groove that many years of use have worn in my brain), the refactoring and unit-testing capabilities of contemporary IDEs (including Eclipse, IntelliJ, and NetBeans) more than make up for the loss of '/', 'n', 'N', '.', 's///', and their cousins. (And yes, after an intense cross-platform/cross-language session, I do occasionally find my fingers heading for 'j' instead of the down-arrow. ;-)

I still believe that the command line and shell scripts are excellent tools for some tasks (just as I believe that real books have words on the page, and not pictures of Dick, Jane, and Spot ;-), and I also believe that every real programmer should be proficient in vi or emacs (or TECO, to really be a real programmer;-).

Your question implies that you don't yet know vi/vim that well yet, and I encourage you to pursue your interest. Two good sources are Learning the vi and Vim Editors and VI Editor Pocket Reference. By all means, learn vi/vim and have fun, but I respectfully suggest that they probably won't displace a good IDE as your primary Java programming environment.

joel.neely
A: 

Don't go overboard on learning Vim; try a simple intro tutorial and see how you go (here's a decent one I used: http://www-acs.ucsd.edu/info/vi_tutorial.shtml).

Most Vim users don't get into the complex stuff - just keeping it simple is all you need...

+1  A: 

Learning the vi Editor is a good book.

I learned most of my vi editing skills from that book, highly recommended. It doesn't show you the path from Eclipse to VIM, but it's a very good book to start with. It has nice chapters that help you begin with the base vi editor and in the end it has 1 chapter dedicated for VIM.

If you want to use it for your Java project, you should search more on cscope with VIM for Java.

artknish
A: 

As other have stated, I would suggest you to start getting comfortable with Vim by following a basic tutorial (vimtutor is what got me into the Vim world first).

I personnally use Eclipse over Vim for Java development, but there are still a number of ways I've managed to enhance my Vim setup for quick Java editing:

skinp