Misc
guu : lowercase line
gUU : uppercase line
g~~ : flip case line
gf : open file name under cursor (SUPER)
ga : display hex, ascii value of char under cursor
gv : Re-select the previous visual area (ULTRA)
[I : show lines matching word under cursor (SUPER)
>i{ : Block shifting (MAGIC)
q/ : Search history Window
q: : commandline history Window
J : join next line to this line
Recording macros
qq : record to q your series of commands q : stop recording @q : execute @@ : repeat
GVIM Difference Function
vimdiff file1 file2 dp : "put" difference under cursor to other file do : "get" difference under cursor from other file
Markers
'. : jump to last modification line (SUPER) `. : jump to exact spot in last modification line ma : place a mark named "x" at current location 'x : jump to mark named "x" at THIS file 'X : jump to mark named "X" at ANY file d'x : delete to mark "x"
Tabs
:tab sball : move all open files to individual tabs (SUPER) :tabedit /path/file : open file in new tab :tabfind ... : search file and open in new tab :tab help ... : open help in new tab gt : go to next tab gT : go to prev tab
Buffers
:e filename : open "filename" in new full-screen buffer <C-^> : switch between two last buffers :bnext : switch to next buffer (just map it to <Tab>)
Registers
"xY : yank to register "x" (x may be any a-z) "xp : paste from register "x" <C-R>x : paste from register "x" in INSERT mode :reg : display contents of all registers :echo @x : display (multi-line) content of register "x" :s/fred/\=@x/g : sub "fred" with contents of register "x"
Searching
/\Vpattern : all charactes in pattern treated literally ex. \
/\cpattern : case-insensitive match
/joe/e : cursor set to End of match
/joe/e+1 : cursor set to End of match plus 1
/joe/s-2 : cursor set to Start of match minus 2
/begin\_.*end : search over possible multiple lines
/begin\_s*end : any whitespace including newline
/begin\_.\{-}end : any whitespace including newline NON-GREEDY
Folding
zo : open fold zc : re-close fold