3

The documentation for :norm[al][!] states that "mappings will not be used" when the ! is written.

Consider the following setup commands:

:nnoremap \c Chello<esc>
:let @q = '\cIthis is a contrived example: ' . "\<esc>"
:%norm! @q

Will the <leader>c mapping be applied each time the q macro is executed? Or are all user mappings disabled?

1 Answer 1

3

Yes, mappings inside the macro are still applied as normal.

For example, apply the commands in the question to the file:

line1
line2
line3
line4

The output will be:

this is a contrived example: hello
this is a contrived example: hello
this is a contrived example: hello
this is a contrived example: hello

Which indicates that the \c mapping was used when the macro was executed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.