Delete lines matching pattern
Delete all lines starting with # (comment lines)
:g/^#/d
- tool
- vim10 commands
More vim commands
-
gg=GGo to top (gg), re-indent to end of file (=G)
-
qa (record into a) q (stop) @a (play) 10@a (play 10 times)Macros automate repetitive edits in vim
-
:set numberToggle line numbers on (use :set nonumber to hide)
-
:vsplit other.txtVertical split; use Ctrl-w + arrow to navigate panes
-
:wqWrite file and quit vim