What does nore mean when mapping keys in vim? For example, what is the difference between these two mappings?
:map ddd ddjdd
and
:noremap ddd ddjdd
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It means the mapping is no n – re cursive.
To illustrate,
say you map
xin normal mode todd(delete line), to save up some time in well, deleting lines. Everything works fine, until you need the x (delete character) in some other mapping to delete two characters,because now the upper mapping is really
i.e. will delete two lines.
So, to preserve the “original” mappings (vim keys), you do it the non-recursive way,
and everything works (the mappings do not … ah, you get the idea) …
It is generally a good practice to do all your mapping with “nore”, because you never know what plugins may be relying on what, and what vim behaviour you’re breaking with “ordinary” mappings.