1
- *map.txt* For Vim version 9.1. Last change: 2023 May 28
1
+ *map.txt* For Vim version 9.1. Last change: 2024 Jan 25
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -21,9 +21,10 @@ manual.
21
21
1.9 Using mappings | map-typing |
22
22
1.10 Mapping alt-keys | :map-alt-keys |
23
23
1.11 Mapping meta-keys | :map-meta-keys |
24
- 1.12 Mapping in modifyOtherKeys mode | modifyOtherKeys |
25
- 1.13 Mapping with Kitty keyboard protocol | kitty-keyboard-protocol |
26
- 1.14 Mapping an operator | :map-operator |
24
+ 1.12 Mapping super-keys or command keys | :map-super-keys |
25
+ 1.13 Mapping in modifyOtherKeys mode | modifyOtherKeys |
26
+ 1.14 Mapping with Kitty keyboard protocol | kitty-keyboard-protocol |
27
+ 1.15 Mapping an operator | :map-operator |
27
28
2. Abbreviations | abbreviations |
28
29
3. Local mappings and functions | script-local |
29
30
4. User-defined commands | user-commands |
@@ -406,7 +407,7 @@ Note:
406
407
*E1255* *E1136*
407
408
<Cmd> and <ScriptCmd> commands must terminate, that is, they must be followed
408
409
by <CR> in the {rhs} of the mapping definition. | Command-line | mode is never
409
- entered.
410
+ entered. To use a literal <CR> in the {rhs} , use | <lt> | .
410
411
411
412
412
413
1.3 MAPPING AND MODES *:map-modes*
@@ -586,10 +587,12 @@ While mappings are being listed, it is not possible to add or clear mappings,
586
587
e.g. from a timer callback. *E1309*
587
588
588
589
*:map-verbose*
589
- When 'verbose' is non-zero, listing a key map will also display where it was
590
+ When 'verbose' is non-zero, the detected and used 'keyprotocol' value will be
591
+ displayed in the first line. Also a key map will also display where it was
590
592
last defined. Example: >
591
593
592
594
:verbose map <C-W>*
595
+ Kitty keyboard protocol: Cleared
593
596
n <C-W>* * <C-W><C-S>*
594
597
Last set from /home/abcd/.vimrc
595
598
@@ -983,8 +986,17 @@ For the Meta modifier the "T" character is used. For example, to map Meta-b
983
986
in Insert mode: >
984
987
:imap <T-b> terrible
985
988
989
+ 1.12 MAPPING SUPER-KEYS or COMMAND-KEYS *:map-super-keys* *:map-cmd-key*
986
990
987
- 1.12 MAPPING IN modifyOtherKeys mode *modifyOtherKeys*
991
+ The Super modifier is available in GUI mode (when | gui_running | is 1) for
992
+ GVim on Linux and MacVim on Mac OS. If you're on a Mac, this represents the
993
+ Command key, on Linux with the GTK GUI it represents the Super key.
994
+ The character "D" is used for the Super / Command modifier.
995
+
996
+ For example, to map Command-b in Insert mode: >
997
+ :imap <D-b> barritone
998
+
999
+ 1.13 MAPPING IN modifyOtherKeys mode *modifyOtherKeys*
988
1000
989
1001
Xterm and a few other terminals can be put in a mode where keys with modifiers
990
1002
are sent with a special escape code. Vim recognizes these codes and can then
@@ -1046,7 +1058,7 @@ When the 'esckeys' option is off, then modifyOtherKeys will be disabled in
1046
1058
Insert mode to avoid every key with a modifier causing Insert mode to end.
1047
1059
1048
1060
1049
- 1.13 MAPPING WITH KITTY KEYBOARD PROTOCOL *kitty-keyboard-protocol*
1061
+ 1.14 MAPPING WITH KITTY KEYBOARD PROTOCOL *kitty-keyboard-protocol*
1050
1062
1051
1063
If the value of 'term' contains "kitty" then Vim will send out an escape
1052
1064
sequence to enable the Kitty keyboard protocol. This can be changed with the
@@ -1073,7 +1085,7 @@ translated). The meaning of {value}:
1073
1085
previous state is unknown
1074
1086
1075
1087
1076
- 1.14 MAPPING AN OPERATOR *:map-operator*
1088
+ 1.15 MAPPING AN OPERATOR *:map-operator*
1077
1089
1078
1090
An operator is used before a {motion} command. To define your own operator
1079
1091
you must create a mapping that first sets the 'operatorfunc' option and then
@@ -1629,6 +1641,7 @@ completion can be enabled:
1629
1641
-complete=help help subjects
1630
1642
-complete=highlight highlight groups
1631
1643
-complete=history :history suboptions
1644
+ -complete=keymap keyboard mappings
1632
1645
-complete=locale locale names (as output of locale -a)
1633
1646
-complete=mapclear buffer argument
1634
1647
-complete=mapping mapping name
0 commit comments