Delete first word of each line

:normal to the rescue:

:%norm dw

It basically replays the arguments as if you were typing them in normal (‘non-edit’) mode.

From :help :

:norm[al][!] {commands}

Execute Normal mode commands {commands}.

This makes it possible to execute Normal mode commands typed on the
command-line. {commands} is executed like it is typed.

Leave a Comment

error code: 521