Tuesday, February 4, 2014

VI shortcuts and tips

Goto end of document: SHIFT-g
Goto begining of document 1-SHIFT-g or :0
Goto end of line: $
Goto begining of line: 0
Insert line before current: SHIFT-o
Insert line after current: o
Join with next line: SHIFT-j
Search forward: /
Search backwards: ?

getting rid of ^M: :%s/CTRL-V CTRL-M//g (This will replace all carriage return characters with nothing as they are only needed in windows text editors.)

Many tanks to my friend Batalha - a true living VI encyclopedia!

No comments:

Post a Comment