Wiki: Best Tips


Note: You are viewing an old revision of this page. View the current version.


For a "big" vim tips page, check out http://www.rayninfo.co.uk/vimtips.html

For "java" vim tips, check out http://www.ophinity.com/papers/jim/index.html

For "ruby" vim tips (such as how to get MatchIt to work with ruby) read http://www.rubygarden.org/ruby?VimExtensions and http://www.rubygarden.org/ruby?VimRubySupport

All these tips assume normal mode unless they state otherwise. These are tips assuming you can fire up and exit vim, this is not where you should start learning about vim.

    * Using the "*" key searches for the word under the cursor, use "#" to do the same thing backwards.
    * Using the "%" key on brackets {} () he 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
          o :nmap j gj
          o :nmap k gk

Sponsored by: Labrat Technology -- Need Consulting Services? Programming, Maintenance, Security, Database Analysis & Design, Hosting -- we do it all!
Copyright 2005 Robert Melton
Send questions and comments to
Last updated March 10th, 2005