We provide a full-text selection and then run Macros in the selected row. Normal is a very useful thing. Its meaning is to run some operations under the norm model in the command, it provides the possibility of many combined operations and expands the dimensions of using vim, such
: G // \ // norm dd can delete all commentsCodeLine.
It's occasionally handy to be able to run a macro that you 've got ready on aspecific subset of lines of the file, or perhaps just for every line. fortunately, there's a way to do this, too.
Using: Normal
Command, you're able to run macros from the ex command line:
: Normal @
All it takes is prefixing this with any sort
Range definition to allowyou to run a macro on any set of lines that you're able to define.
Run the macro on each line of the whole Buffer:
: % Normal @
Between lines 10 and 20:
: 10, 20 normal @
On the lines in the current visual selection:
: '<,'> Normal @
On the lines containing the pattern VIM:
: G/Vim/normal @
When you get confident using this,: Norm
Is a nice abbreviation to use.