The Diffrerence 在 :map 和 :noremap 里 in VIM

来源:互联网 发布:收益最多的理财软件 编辑:程序博客网 时间:2024/06/06 00:51

The Difference Between :map and :noremap in Vim

OCT 8TH, 2011

Simply put :map and :noremap are recursive and non-recursive mapping commands.

Huh?

Let’s say you have the following in your .vimrc

.vimrc
123
map j kmap L jnoremap m j
  • j will be mapped to k
  • L will also be mapped to k, because j is expanded for recursive mapping.
  • m will be mapped to j (not to k)

Modes

Since Vim has different modes, NormalInsertVisual and so on, mappings can be set for these modes. For example,:vmap and :vnoremap is for Visual mode mappings.

More Info

123
:help :map:help :noremap:help :map-modes