This is similar to a grep on the local buffer. To delete all lines matching a certain regular expression pattern, use :g/pattern/d To do the opposite, i.e. only keep those lines matching the pattern, use :v/pattern/d And to only temporarily print matching lines, use :g/pattern
1 comment:
Anonymous
said...
If you want to strip out string OR string1 OR string2 etc, it'll look something like:
1 comment:
If you want to strip out string OR string1 OR string2 etc, it'll look something like:
:v/error\|warn\|fail/d
Post a Comment