written on July 29, 2010
If you are a Vim user, you probably have your own set of tricks that make your editing life a more pleasant experience. So here my set of things I love about Vim and might be worth sharing.
Some things first: normal mode = mode you enter with ESC, insert mode = mode you enter with i (or any other insert starting key).
That's probably a no brainer because everybody does it all the time, but
searching in Vim is a pretty cool experience. Standard search is from
normal mode by typing /searchword
. To go to the next result use n
.
If you want to search in the reverse direction, use ?
instead of /
.
If you want to continue the search with the last searchword, just use
/
or ?
.
Sometimes you want to search for the word you are just having your
cursor over. That's possible by using *
in normal mode, which will
search for that words forward, #
searches for that word backwards.
When you use *
you will notice in the status bar that Vim is wrapping
the word in