vimdojo
Command Mode
:g/pat/d

Delete all lines matching a pattern

:g/DEBUG/d
~/vimdojo/greet.py
PYTHON · UTF-8 · LF
1
2
3
4
def greet(name):
msg = "hello, " + name
print(msg)
return msg
NORMAL
main
python
Ln 2, Col 5
-- NORMAL --
Free practice — click the editor, then type. Try :g/pat/d yourself.