Syntax :[range]:g/
Some examples of its usage:
Delete all lines matching a pattern
:g/
Delete all blank lines
:g/^\s*$/d
I also found this tip in the vim website, which contains a lot more examples:
http://www.vim.org/tips/tip.php?tip_id=227
Commmon problems. Uncommon know-hows.
No comments:
Post a Comment