1
- *map.txt* For Vim version 8.1. Last change: 2018 Dec 18
1
+ *map.txt* For Vim version 8.1. Last change: 2019 May 05
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
76
76
Map the key sequence {lhs} to {rhs} for the modes
77
77
where the map command applies. Disallow mapping of
78
78
{rhs} , to avoid nested and recursive mappings. Often
79
- used to redefine a command. {not in Vi}
79
+ used to redefine a command.
80
80
81
81
82
82
:unm[ap] {lhs} | mapmode-nvo | *:unm* *:unmap*
@@ -110,7 +110,7 @@ modes.
110
110
:cmapc[lear] | mapmode-c | *:cmapc* *:cmapclear*
111
111
:tmapc[lear] | mapmode-t | *:tmapc* *:tmapclear*
112
112
Remove ALL mappings for the modes where the map
113
- command applies. {not in Vi}
113
+ command applies.
114
114
Use the <buffer> argument to remove buffer-local
115
115
mappings | :map-<buffer> |
116
116
Warning: This also removes the default mappings.
@@ -143,7 +143,6 @@ modes.
143
143
:tma[p] {lhs} | mapmode-t | *:tmap_l*
144
144
List the key mappings for the key sequences starting
145
145
with {lhs} in the modes where the map command applies.
146
- {not in Vi}
147
146
148
147
These commands are used to map a key or key sequence to a string of
149
148
characters. You can use this to put command sequences under function keys,
@@ -160,7 +159,6 @@ decide if "aa" or "aaa" should be mapped. This means that after typing "aa"
160
159
that mapping won't get expanded yet, Vim is waiting for another character.
161
160
If you type a space, then "foo" will get inserted, plus the space. If you
162
161
type "a", then "bar" will get inserted.
163
- {Vi does not allow ambiguous mappings}
164
162
165
163
166
164
1.2 SPECIAL ARGUMENTS *:map-arguments*
@@ -1016,45 +1014,40 @@ See |:verbose-cmd| for more information.
1016
1014
1017
1015
*:norea* *:noreabbrev*
1018
1016
:norea[bbrev] [<expr> ] [<buffer> ] [lhs] [rhs]
1019
- same as ":ab", but no remapping for this {rhs} {not
1020
- in Vi}
1017
+ Same as ":ab", but no remapping for this {rhs} .
1021
1018
1022
1019
*:ca* *:cabbrev*
1023
1020
:ca[bbrev] [<expr> ] [<buffer> ] [lhs] [rhs]
1024
- same as ":ab", but for Command-line mode only. {not
1025
- in Vi}
1021
+ Same as ":ab", but for Command-line mode only.
1026
1022
1027
1023
*:cuna* *:cunabbrev*
1028
- :cuna[bbrev] {lhs} same as ":una", but for Command-line mode only. {not
1029
- in Vi}
1024
+ :cuna[bbrev] {lhs} Same as ":una", but for Command-line mode only.
1030
1025
1031
1026
*:cnorea* *:cnoreabbrev*
1032
1027
:cnorea[bbrev] [<expr> ] [<buffer> ] [lhs] [rhs]
1033
1028
same as ":ab", but for Command-line mode only and no
1034
- remapping for this {rhs} {not in Vi}
1029
+ remapping for this {rhs}
1035
1030
1036
1031
*:ia* *:iabbrev*
1037
1032
:ia[bbrev] [<expr> ] [<buffer> ] [lhs] [rhs]
1038
- same as ":ab", but for Insert mode only. {not in Vi}
1033
+ Same as ":ab", but for Insert mode only.
1039
1034
1040
1035
*:iuna* *:iunabbrev*
1041
- :iuna[bbrev] {lhs} same as ":una", but for insert mode only. {not in
1042
- Vi}
1036
+ :iuna[bbrev] {lhs} Same as ":una", but for insert mode only.
1043
1037
1044
1038
*:inorea* *:inoreabbrev*
1045
1039
:inorea[bbrev] [<expr> ] [<buffer> ] [lhs] [rhs]
1046
- same as ":ab", but for Insert mode only and no
1047
- remapping for this {rhs} {not in Vi}
1040
+ Same as ":ab", but for Insert mode only and no
1041
+ remapping for this {rhs} .
1048
1042
1049
1043
*:abc* *:abclear*
1050
- :abc[lear] [<buffer> ] Remove all abbreviations. {not in Vi}
1044
+ :abc[lear] [<buffer> ] Remove all abbreviations.
1051
1045
1052
1046
*:iabc* *:iabclear*
1053
- :iabc[lear] [<buffer> ] Remove all abbreviations for Insert mode. {not in Vi}
1047
+ :iabc[lear] [<buffer> ] Remove all abbreviations for Insert mode.
1054
1048
1055
1049
*:cabc* *:cabclear*
1056
- :cabc[lear] [<buffer> ] Remove all abbreviations for Command-line mode. {not
1057
- in Vi}
1050
+ :cabc[lear] [<buffer> ] Remove all abbreviations for Command-line mode.
1058
1051
1059
1052
*using_CTRL-V*
1060
1053
It is possible to use special characters in the rhs of an abbreviation.
@@ -1147,8 +1140,7 @@ to find out what they are defined to.
1147
1140
The | :scriptnames | command can be used to see which scripts have been sourced
1148
1141
and what their <SNR> number is.
1149
1142
1150
- This is all {not in Vi} and {not available when compiled without the | +eval |
1151
- feature}.
1143
+ This is all {not available when compiled without the | +eval | feature}.
1152
1144
1153
1145
==============================================================================
1154
1146
4. User-defined commands *user-commands*
@@ -1193,9 +1185,10 @@ scripts.
1193
1185
1194
1186
:com[mand] *:com* *:command*
1195
1187
List all user-defined commands. When listing commands,
1196
- the characters in the first two columns are
1188
+ the characters in the first columns are:
1197
1189
! Command has the -bang attribute
1198
1190
" Command has the -register attribute
1191
+ | Command has the -bar attribute
1199
1192
b Command is local to current buffer
1200
1193
(see below for details on attributes)
1201
1194
The list can be filtered on command name with
@@ -1390,7 +1383,7 @@ Possible attributes are:
1390
1383
number.
1391
1384
-count=N A count (default N) which is specified either in the line
1392
1385
number position, or as an initial argument (like | :Next | ).
1393
- Specifying -count (without a default) acts like -count=0
1386
+ -count acts like -count=0
1394
1387
1395
1388
Note that -range=N and -count=N are mutually exclusive - only one should be
1396
1389
specified.
@@ -1400,14 +1393,17 @@ It is possible that the special characters in the range like ., $ or % which
1400
1393
by default correspond to the current line, last line and the whole buffer,
1401
1394
relate to arguments, (loaded) buffers, windows or tab pages.
1402
1395
1403
- Possible values are:
1404
- -addr=lines Range of lines (this is the default)
1405
- -addr=arguments Range for arguments
1406
- -addr=buffers Range for buffers (also not loaded buffers)
1407
- -addr=loaded_buffers Range for loaded buffers
1408
- -addr=windows Range for windows
1409
- -addr=tabs Range for tab pages
1410
- -addr=other other kind of range
1396
+ Possible values are (second column is the short name used in listing):
1397
+ -addr=lines Range of lines (this is the default for -range)
1398
+ -addr=arguments arg Range for arguments
1399
+ -addr=buffers buf Range for buffers (also not loaded buffers)
1400
+ -addr=loaded_buffers load Range for loaded buffers
1401
+ -addr=windows win Range for windows
1402
+ -addr=tabs tab Range for tab pages
1403
+ -addr=quickfix qf Range for quickfix entries
1404
+ -addr=other ? other kind of range; can use ".", "$" and "%"
1405
+ as with "lines" (this is the default for
1406
+ -count)
1411
1407
1412
1408
1413
1409
Special cases ~
0 commit comments