Monday, August 3, 2009

whole word matching in vim

The way we do whole word matching could be as follows:
suppose you want to match fname in a c file, but not the fnames.
You could try /fname\W, where \W can match any non-letter.

If you want to match fnames rather than fname, use /fnames

A link about the vim re can be found here:
http://www.geocities.com/volontir/#substitute

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.