diff options
Diffstat (limited to 'runtime/doc/map.txt')
-rw-r--r-- | runtime/doc/map.txt | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index c65007d1a4..cd374c6f34 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -540,28 +540,10 @@ See |:verbose-cmd| for more information. 1.5 MAPPING SPECIAL KEYS *:map-special-keys* -There are two ways to map a special key: -1. The Vi-compatible method: Map the key code. Often this is a sequence that - starts with <Esc>. To enter a mapping like this you type ":map " and then - you have to type CTRL-V before hitting the function key. Note that when - the key code for the key is in the |terminfo| entry, it will automatically - be translated into the internal code and become the second way of mapping. -2. The second method is to use the internal code for the function key. To - enter such a mapping type CTRL-K and then hit the function key, or use - the form "#1", "#2", .. "#9", "#0", "<Up>", "<S-Down>", "<S-F7>", etc. - (see table of keys |key-notation|, all keys from <Up> can be used). The - first ten function keys can be defined in two ways: Just the number, like - "#2", and with "<F>", like "<F2>". Both stand for function key 2. "#0" - refers to function key 10. - -DETAIL: Vim first checks if a sequence from the keyboard is mapped. If it -isn't the terminal key codes are tried. If a terminal code is found it is -replaced with the internal code. Then the check for a mapping is done again -(so you can map an internal code to something else). What is written into the -script file depends on what is recognized. If the terminal key code was -recognized as a mapping the key code itself is written to the script file. If -it was recognized as a terminal code the internal code is written to the -script file. +To map a function key, use the internal code for it. To enter such a mapping +type CTRL-K and then hit the function key, or use the form "<F2>", "<F10>", +"<Up>", "<S-Down>", "<S-F7>", etc. (see table of keys |key-notation|, all keys +from <Up> can be used). 1.6 SPECIAL CHARACTERS *:map-special-chars* |