For example, add a new line above/below every comment in code
(just leave “whatever you want” blank and use a capital O to add the line above!)
source also: all about the normal command
Just add ^ to the start of the search. (Works well with the above normal command!) eg:
(this adds a newline echo above every echo command in the batch file, but NOT about @echo OFF lines.)
:g will execute a command on lines which match a regex. The regex is ‘blank line’ and the command is :d (delete)