:set textwidth=80 autobreak lines after whitespace. this behavior is often nice when writing code or documentation. the only problem is that nothing rewraps if you start changing lines, but rewrapping isn't too tough using J to join lines :set nu Show line numbers QuickFix (quick making/building) :mak - run the build :cn - next error :cp - previous error :clist - list errors :cfirst - first error :clast - last error Folding :set foldmethod=marker :set foldmarker={{{,}}} za - toggle fold zo - open fold zO - recursive open zc - close fold zC - recursive close zm - global close one level zM - close all folds zr - global open one level zR - open all folds [z - move to start of current fold ]z - move to end of current fold zj - move down to next fold zk - move up to next fold :colo - color scheme to use Useful plugins buffer explorer taglist :e# - jump to previous file :ls - list open buffers (if you don't have bufexplorer) Search and replace :%s/foo/bar/g (global search and replace. in the example, all instances of "foo" get replaced by "bar") '' - jump to jump spot '. - jump to last modification line :split Running text through the command line Visual Search, then :!command Whole file Get shell output easily in vim :r!command args :r!ls -1 ~ - Macros qX - record macro on register X @X - run macros recorded on registar X @@ - run last macro - Registers use these modifiers with 'y' and 'p' To copy into register 'a', use "ay (this yanks into register a) to paste from reg 'a', "ap syntax highlighting on :syn filetypes determine syntax highlighting ## adding filetype to syntax definition thingies :set filetype=blah :set fileformat=[dos|unix|max] Tags I'm still trying to get these to work for Java and PHP Code Stuff [{ and ]} - find beginning and end of curly brace blocks [( and ]) - find beginning and end of paren blocks [m and ]m - find previous and next methods/functions % - find matching () or {} Auto completion CTRL-p CTRL-a - increment next number CTRL-x - decrement next number :set nrformat possibilities: alpha, octal, hex * highly effective text editing document vim.org tips