February 16, 2010

Couple of vim tips

When in command mode, you can grab the word that is under the cursor. Makes search and replace for those long function names painless.

C-r C-w

The other little trick I didn’t know about until I accitently brought it up was the command history. This subtle little thing makes a huge diffrence. You can use normal vim movement keys to edit the commands, and when you are done just hit <enter< on the line and it will execute it.


Of course you can do the same thing with search.