Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
bradrn
· 2y ago · 0 comments
You can do it with evil-mode (or vim) too: :%v/pattern/d runs ‘d’ on all lines which do not match the pattern. (The opposite is :%g/pattern/d.) I believe it works with any command, though I’ve only ever used it with ‘d’.
Comments
[–]
clscott
2y ago
%v/pattern/d can also be written as %g!/pattern/d