Question says it all.
views:
306answers:
2remap
is an option that makes mappings work recursively. By default it is on and I'd recommend you leave it that way.
There's then a set of mapping commands like :map
and :noremap
, which are recursive and non-recursive versions of the various mapping commands.
In this example, :map
is the recursive one and :noremap
is the non-recursive one. What that means is that if you do:
:map j gg
:map Q j
:noremap W j
j
will be mapped to gg
, Q
will be mapped to gg
(as the j
will be expanded for the recursive mapping) and W
will be mapped to j
(as the j
will not be expanded for the non-recursive mapping).
For each of these sets (recursive and non-recursive), there is a mapping that works in every mode (:map
and :noremap
are recursive and non-recursive respectively), one that works in normal mode (:nmap
and :nnoremap
), one in visual mode (:vmap
and :vnoremap
) etc.
For more guidance on this, see:
:help :map
:help :noremap
:help recursive_mapping
:help :map-modes
caution, vnoremap and vmap work in visual AND select mode. To have a mapping only in visual mode, use xmap and xnoremap.