Command Mode
:g/pat/d
Delete all lines matching a pattern
:g/DEBUG/d
1
2
3
4
def greet(name):
msg = "hello, " + name
print(msg)
return msg
-- NORMAL --
Free practice — click the editor, then type. Try
:g/pat/d yourself.