Using Very Magic to Make Vim Regular Expressions Cleaner

Say you want to look for all regular expressions of the form “a*b*c*a*” in a file, and strip of the a’s in the beginning and in the end.
Without “Very Magic”:


Using “Very Magic”:


Much cleaner. Keep in mind that the example above is a simple one. In longer examples the benefit might be more obvious.

Leave a Reply