Friday, January 21, 2011

vi Search backwards

For some reason I couldn't ever remember how to do a backward search in vi. So I would use forward search command, "/pattern" and then do "N" which is fine except the clumsy usage of uppercase.

Backward search can be done with "?pattern" and then do "n" to iterate over all the occurrences. Committed to memory now.

No comments:

Post a Comment