Exit Wiki

Delete from current line to end of file:

 :.,$d

Delete from current line to top of file:

 dGG

Mac to Unix Line Endings

This trick from iMike's post on macosxhints

:%s/^M/^M/g

NOTE: You will need to type shift+: to get to the colon prompt in vi you can then enter the command starting with the % symbol. The ^M actually maps to control+shift+v followed by control+shift+m (+'s are not included), so in actuality the command looks like this:

:%s/control V control M/control V control M/g

Show Invisibles

:set list

then to hide invisibles

:set nolist

Paste Text with no indent

:set paste

(do your paste here)

:set nopaste

Neat vim tutorials/cheatsheets

PixelBeat's VIM cheatsheet

VimDiff and multiple windows tutorial

vi Tricks (last edited 2008-05-05 03:52:17 by RyanWilcox)