Which are the vim key notations?

vim
7,166

Use the vim help:

:h key-notation

The corresponding VimDoc page is http://vimdoc.sourceforge.net/htmldoc/intro.html#key-notation.

A partial reproduction:

notation        meaning             equivalent  decimal value(s)
-----------------------------------------------------------------------
<Nul>           zero                    CTRL-@    0 (stored as 10) <Nul>
<BS>            backspace               CTRL-H    8     backspace
<Tab>           tab                     CTRL-I    9     tab Tab
                                                        linefeed
<NL>            linefeed                CTRL-J   10 (used for <Nul>)
<FF>            formfeed                CTRL-L   12     formfeed
<CR>            carriage return         CTRL-M   13     carriage-return
<Return>        same as <CR>                            <Return>
<Enter>         same as <CR>                            <Enter>
<Esc>           escape                  CTRL-[   27     escape <Esc>
<Space>         space                            32     space
<lt>            less-than               <        60     <lt>
<Bslash>        backslash               \        92     backslash <Bslash>
<Bar>           vertical bar            |       124     <Bar>
<Del>           delete                          127
<CSI>           command sequence intro  ALT-Esc 155     <CSI>
<xCSI>          CSI when typed in the GUI               <xCSI>

<EOL>           end-of-line (can be <CR>, <LF> or <CR><LF>,
                depends on system and 'fileformat')     <EOL>

<Up>            cursor-up                       cursor-up cursor_up
<Down>          cursor-down                     cursor-down cursor_down
<Left>          cursor-left                     cursor-left cursor_left
<Right>         cursor-right                    cursor-right cursor_right
<S-Up>          shift-cursor-up
<S-Down>        shift-cursor-down
<S-Left>        shift-cursor-left
<S-Right>       shift-cursor-right
<C-Left>        control-cursor-left
<C-Right>       control-cursor-right
<F1> - <F12>    function keys 1 to 12           function_key function-key
<S-F1> - <S-F12> shift-function keys 1 to 12    <S-F1>
<Help>          help key
<Undo>          undo key
<Insert>        insert key
<Home>          home                            home
<End>           end                             end
<PageUp>        page-up                         page_up page-up
<PageDown>      page-down                       page_down page-down
<kHome>         keypad home (upper left)        keypad-home
<kEnd>          keypad end (lower left)         keypad-end
<kPageUp>       keypad page-up (upper right)    keypad-page-up
<kPageDown>     keypad page-down (lower right)  keypad-page-down
<kPlus>         keypad +                        keypad-plus
<kMinus>        keypad -                        keypad-minus
<kMultiply>     keypad *                        keypad-multiply
<kDivide>       keypad /                        keypad-divide
<kEnter>        keypad Enter                    keypad-enter
<kPoint>        keypad Decimal point            keypad-point
<k0> - <k9>     keypad 0 to 9                   keypad-0 keypad-9
<S-...>         shift-key                       shift <S-
<C-...>         control-key                     control ctrl <C-
<M-...>         alt-key or meta-key             meta alt <M-
<A-...>         same as <M-...>                 <A-
<D-...>         command-key (Macintosh only)    <D-
<t_xx>          key with "xx" entry in termcap
Share:
7,166

Related videos on Youtube

La Murga
Author by

La Murga

Updated on September 18, 2022

Comments

  • La Murga
    La Murga over 1 year

    Is there a list of the key notations and combination for vim. Something like this:

    <Right>        Right arrow 
    <C-t>          Ctr+t
    etc..
    

    I found a somewhat incomplete table here: http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-Tutorial%28Part_2%29

    But I have not come across with an extensive list yet.

  • theprogrammer
    theprogrammer over 3 years
    Do you know whats the notation for actual Fn key? Like on some keyboards we have it right near windows key usually? Its sometimes denoted as "Fn" key. Its also called as function lock key sometimes I think. Thanks
  • muru
    muru over 3 years
    @theprogrammer there is none. Usually it modifies the key behaviour without the application even knowing (or in some cases, even the OS).