nnoremap
nnoremap is a Vim and Neovim command used to create non-recursive mappings for normal mode. It assigns a left-hand side sequence of keys to a right-hand side action without allowing the right-hand side to be remapped by other mappings. This ensures predictable behavior and prevents accidental recursion if the RHS happens to be mapped elsewhere.
Syntax and scope: The basic form is nnoremap lhs rhs. The lhs is the key sequence pressed
Comparison and related mappings: nnoremap is the normal-mode counterpart of the broader noremap family. There are
Best practices: Use non-recursive mappings for user-defined shortcuts and plugin integrations to keep mappings stable. Prefer
- nnoremap <silent> <leader>p <Plug>MyPluginDoSomething
Overall, nnoremap provides safe, predictable normal-mode key remapping suitable for both personal workflow customization and plugin