Try using `:g/\\draw/norm gc` From `:help norm`: > Execute Normal mode commands {commands}. This makes it possible > to execute Normal mode commands typed on the command-line. > {commands} are executed like they are typed.