Применение макросов для определённых строчек:
Execute the macro stored in register a on lines 5 through 10.
:5,10norm! @a
Execute the macro stored in register a on lines 5 through the end of the file.:5,$norm! @a
Execute the macro stored in register a on all lines.:%norm! @a
Execute the macro store in register a on all lines matching pattern.:g/pattern/norm! @a
Последнее спасло меня от бессмысленной траты времени. В частности, мне нужно было убрать "/" в конце тех строк, в которых "/" есть. Если Вы можете решить эту проблему иначе, то напишите мне в лс. Будет интересно узнать :)https://stackoverflow.com/questions/390174/in-vim-how-do-i-apply-a-macro-to-a-set-of-lines