Vim Tips Wiki


1,624pages on
this wiki
Add New Page
Talk0 Share

Mapping a key causes Vim to perform a sequence of operations when a specified key is pressed. See:

Keys to mapEdit

For information on which keys to map, see :help map-which-keys and :help keycodes and part 2 of the tutorial. It is also possible to map mouse events, see part 1 of the tutorial.

In insert mode, you can determine the name of a special key by pressing Ctrl-K then pressing the special key. For example, enter i to enter insert mode, then press Ctrl-K followed by Ctrl-Left (hold down the Ctrl key and press the left arrow key). Vim will insert the name of the key, namely <C-Left>.

The keys above the cursor arrows keys are:

  • <Insert>
  • <Del>
  • <Home>
  • <End>
  • <PageUp>
  • <PageDown>

The keys on the numeric keypad are:

  • <kDivide>
  • <kMultiply>
  • <kHome>
  • <kEnd>
  • <kPageUp>
  • <kPageDown>
  • <kMinus>
  • <kPlus>
  • <kEnter>
  • <kPoint>
  • <k0> to <k9>


I don't know whether to make this a "tip". Perhaps an overview with a quickref is useful? Should we think if a couple of pages like this might be created, but not given the "tip" template at the top? JohnBeckett (talk) 04:11, July 30, 2012 (UTC)

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki