21.3.12

Mo_VI_n' around

When your editing files on the fly, you need a tool like VIM.  I use VIM almost exclusively for clojure and python.

However, to really be efficient, you can't rely on the arrow keys -> you need to know the shortcuts.

So heres my favorites :

Inside of VI

1) VI : the '$' sign : teleports you to the END of a line.
2) VI : the 'w' key goes FORWARD a word, the 'b' key goes BACKWARDS.
3) VI : the '0' key sends you to the BEGGINING of the line.
4) VI : the '/' key takes you to the NEXT instance of a string.  i.e. /m will move the cursor to the letter "m".

When Opening VI

5) the vi -c 10 myfile.txt command will open the file starting at line 10.  Efficient for ebugging off of the terminal.

I'm just starting to realize that more and VI both support some heavy duty cursor teleportation tools.





No comments:

Post a Comment