For a big vim tips page, check
out http://www.rayninfo.co.uk/vimtips.html
For java vim tips, check out
http://everything101.sourceforge.net/docs/papers/java_and_vim.html
For ruby vim tips (such as how to get MatchIt to work with ruby) read http://www.rubygarden.org/Ruby/page/show/VimExtensions and http://www.rubygarden.org/Ruby/page/show/VimRubySupport
After you have gone through a tutorial (see NewToVim, FAQ, or some other tutorial ) and used Vim for a few days, you might find the following tips useful:
All these tips assume normal mode unless they state otherwise.
- Using the '*' key searches for the word under the cursor, use '#' to do the same thing backwards.
- Using the '%' key on brackets {} () [] will find the matching one.
- Using the '.' key will repeat last change
- Use 'u' to undo, use Ctrl-r to remove the undo
- Hitting 'gf' will open the file under cursor
- bufdo ... will apply '...' to all open buffers
- (Insert Mode) Control-n and Control-p will autocomplete the current word by looking forward or backward in the currently open file(s). Can be bound to tab by using SuperTab. Check out the help for 'complete' to set where Vim will search for autocomplete words.
- :g/this/d applies an Ex command to all lines that match 'this' -- if you are uncomfortable with Ex command, you can go into normal mode. :g/this/normal dd (just like hitting 'dd' in normal mode on any line with 'this' in it)
- If you have really long lines and wrapping turned on, you can map j and k to move down/up to the next visible line by doing ':nmap j gj' and ':nmap k gk'
- to maximize a window, type ":simalt x"