0

Run vim --clean, :nnoremap K ko, and press K -> Nothing happens.

Run vim --clean and press ko -> Vim enters insert mode on second line.

Why?

(I know about big-O, this is just out of curiousity, it appeared in debugging a more complicated map)

  • I guess the mapping is canceled, as the kin the first line is an error. Depending on your settings Vim might beep or flash. – Ralf Dec 17 '18 at 13:44
2

This happens, because a macro usually aborts, if not all of the typed keys work. In your case, the k in the first line is an error, so the macro won't try to run the o command.

  • Ah, I didn't realize that k counts as an error – Bananach Dec 17 '18 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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