Sunday, May 27, 2007

Some Cool Vim Features

:ta /functionname - to search for function names when we dont know the complete function name
:tn - iterate through all the matches of the previous command.

:s/old/new/g - replaces all occurrences on the current line

:!ls - executes external commands

:r - inserts the filename to the position of the cursor

:r !ls - inserts the output of ls to the cursor position

use h j k l for cursor movement in vi

v - Visual mode to select text.
follow the above by operations like 'y' ( to copy ) or 'd' (to delete)

No comments: