Vim is fantastic. It may improve your editing efficiency a lot. After using it for four years, I discovered recently something really useful.
You can do an "instant search" with * (for forward) or # (for backward) command when your cursor is on a word. These commands saves me two seconds for a search with my word under the eyes. Before I switch search mode and type the word. These commands match whole word only, but you can use g* or g# to do a partial match.
Also I started to try to locate my cursor precisely faster with commands each time I want to move it. Before I use l,i,j,k,home,end... I need to repeat many times before the cursor arrives at the good position, now I'm using commands like e,E,b,B,A,0,$,w,W... I need some time to get used with them.
When using visual mode to select lines, I can use the v$ command that will select to the end of the line regardless where my cursor currently is, I use j,k to move upwards or downwards.
Now I also learned to use the J or gJ command to join multiple lines into one. This is extremely useful because I need to do this occasionally and it is really boring to do it manually.
Wednesday, March 3, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment