1- *map.txt* For Vim version 9.1. Last change: 2025 Aug 06
1+ *map.txt* For Vim version 9.1. Last change: 2025 Oct 12
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -105,7 +105,7 @@ modes.
105105 map command applies. The mapping may remain defined
106106 for other modes where it applies.
107107 It also works when {lhs} matches the {rhs} of a
108- mapping. This is for when an abbreviation applied.
108+ mapping. This is for when an abbreviation applied.
109109 Note: Trailing spaces are included in the {lhs} .
110110 See | map-trailing-white | .
111111
@@ -295,7 +295,7 @@ In case you want the mapping to not do anything, you can have the expression
295295evaluate to an empty string. If something changed that requires Vim to
296296go through the main loop (e.g. to update the display), return "\<Ignore> ".
297297This is similar to "nothing" but makes Vim return from the loop that waits for
298- input. Example: >
298+ input. Example: >
299299 func s:OpenPopup()
300300 call popup_create(... arguments ...)
301301 return "\<Ignore>"
@@ -330,7 +330,7 @@ For this reason the following is blocked:
330330If you want the mapping to do any of these let the returned characters do
331331that, or use a | <Cmd> | mapping instead.
332332
333- You can use getchar(), it consumes typeahead if there is any. E.g., if you
333+ You can use getchar(), it consumes typeahead if there is any. E.g., if you
334334have these mappings: >
335335 inoremap <expr> <C-L> nr2char(getchar())
336336 inoremap <expr> <C-L>x "foo"
@@ -542,7 +542,7 @@ it's just used here for this situation.
542542 The simplest way to load a set of related language mappings is by using the
543543'keymap' option. See | 45.5 | .
544544 In Insert mode and in Command-line mode the mappings can be disabled with
545- the CTRL-^ command | i_CTRL-^ | | c_CTRL-^ | . These commands change the value of
545+ the CTRL-^ command | i_CTRL-^ | | c_CTRL-^ | . These commands change the value of
546546the 'iminsert' option. When starting to enter a normal command line (not a
547547search pattern) the mappings are disabled until a CTRL-^ is typed. The state
548548last used is remembered for Insert mode and Search patterns separately. The
@@ -590,7 +590,7 @@ e.g. from a timer callback. *E1309*
590590
591591 *:map-verbose*
592592When 'verbose' is non-zero, the detected and used 'keyprotocol' value will be
593- displayed in the first line. Also a key map will also display where it was
593+ displayed in the first line. Also a key map will also display where it was
594594last defined. Example: >
595595
596596 :verbose map <C-W>*
@@ -748,7 +748,7 @@ Upper and lowercase differences are ignored.
748748
749749 *map-comments*
750750It is not possible to put a comment after these commands, because the '"'
751- character is considered to be part of the {lhs} or {rhs} . However, one can
751+ character is considered to be part of the {lhs} or {rhs} . However, one can
752752use |", since this starts a new, empty command with a comment.
753753
754754 *map_bar* *map-bar*
@@ -827,7 +827,7 @@ Multiplying a count
827827When you type a count before triggering a mapping, it's like the count was
828828typed before the {lhs} . For example, with this mapping: >
829829 :map <F4> 3w
830- Typing 2<F4> will result in "23w". Thus not moving 2 * 3 words but 23 words.
830+ Typing 2<F4> will result in "23w". Thus not moving 2 * 3 words but 23 words.
831831If you want to multiply counts use the expression register: >
832832 :map <F4> @='3w'<CR>
833833 The part between quotes is the expression being executed. | @= |
@@ -960,7 +960,7 @@ configuration). For that, you can add the line: >
960960
961961 set convert-meta on
962962
963- to your ~/.inputrc file. If you're creating the file, you might want to use: >
963+ to your ~/.inputrc file. If you're creating the file, you might want to use: >
964964
965965 $include /etc/inputrc
966966
@@ -991,8 +991,8 @@ in Insert mode: >
991991 1.12 MAPPING SUPER-KEYS or COMMAND-KEYS *:map-super-keys* *:map-cmd-key*
992992
993993The Super modifier is available in GUI mode (when | gui_running | is 1) for gVim
994- on Linux and MacVim on Mac OS. If you're on a Mac, this represents the Command
995- key, on Linux with the GTK GUI it represents the Super key.
994+ on Linux and MacVim on Mac OS. If you're on a Mac, this represents the
995+ Command key, on Linux with the GTK GUI it represents the Super key.
996996The character "D" is used for the Super / Command modifier.
997997
998998For example, to map Command-b in Insert mode: >
@@ -1244,7 +1244,7 @@ an additional rule:
12441244full-id In front of the match is a non-keyword character, or this is where
12451245 the line or insertion starts. Exception: When the abbreviation is
12461246 only one character, it is not recognized if there is a non-keyword
1247- character in front of it, other than a space or a tab. However, for
1247+ character in front of it, other than a space or a tab. However, for
12481248 the command line "'<,'>" (or any other marks) is ignored, as if the
12491249 command line starts after it.
12501250
@@ -1502,8 +1502,8 @@ be the user command ":Cc2" without an argument, or the command ":Cc" with
15021502argument "2". It is advised to put a space between the command name and the
15031503argument to avoid these problems.
15041504
1505- When using a user-defined command, the command can be abbreviated. However, if
1506- an abbreviation is not unique, an error will be issued. Furthermore, a
1505+ When using a user-defined command, the command can be abbreviated. However,
1506+ if an abbreviation is not unique, an error will be issued. Furthermore, a
15071507built-in command will always take precedence.
15081508
15091509Example: >
@@ -1519,8 +1519,8 @@ It is recommended that full names for user-defined commands are used in
15191519scripts.
15201520
15211521:com[mand] *:com* *:command*
1522- List all user-defined commands. When listing commands,
1523- the characters in the first columns are:
1522+ List all user-defined commands. When listing
1523+ commands, the characters in the first columns are:
15241524 ! Command has the -bang attribute
15251525 " Command has the -register attribute
15261526 | Command has the -bar attribute
@@ -1535,7 +1535,7 @@ scripts.
15351535
15361536 *:command-verbose*
15371537When 'verbose' is non-zero, listing a command will also display where it was
1538- last defined and any completion argument. Example: >
1538+ last defined and any completion argument. Example: >
15391539
15401540 :verbose command TOhtml
15411541< Name Args Range Complete Definition ~
@@ -1571,10 +1571,10 @@ See |:verbose-cmd| for more information.
15711571
15721572Command attributes ~
15731573 *command-attributes*
1574- User-defined commands are treated by Vim just like any other Ex commands. They
1575- can have arguments, or have a range specified. Arguments are subject to
1576- completion as filenames, buffers, etc. Exactly how this works depends upon the
1577- command's attributes, which are specified when the command is defined.
1574+ User-defined commands are treated by Vim just like any other Ex commands.
1575+ They can have arguments, or have a range specified. Arguments are subject to
1576+ completion as filenames, buffers, etc. Exactly how this works depends upon
1577+ the command's attributes, which are specified when the command is defined.
15781578
15791579When defining a user command in a script, it will be able to call functions
15801580local to the script and use mappings local to the script. When the user
@@ -1659,7 +1659,7 @@ completion can be enabled:
16591659 -complete=scriptnames sourced script names
16601660 -complete=shellcmd Shell command
16611661 -complete=shellcmdline First is a shell command and subsequent ones
1662- are filenames. The same behavior as | :!cmd |
1662+ are filenames. The same behavior as | :!cmd |
16631663 -complete=sign | :sign | suboptions
16641664 -complete=syntax syntax file names 'syntax'
16651665 -complete=syntime | :syntime | suboptions
@@ -1684,8 +1684,8 @@ function with the following signature: >
16841684
16851685 :function {func}(ArgLead, CmdLine, CursorPos)
16861686
1687- The function need not use all these arguments. The function should provide the
1688- completion candidates as the return value.
1687+ The function need not use all these arguments. The function should provide
1688+ the completion candidates as the return value.
16891689
16901690For the "custom" argument, the function should return the completion
16911691candidates one per line in a newline separated string.
@@ -1701,7 +1701,7 @@ The function arguments are:
17011701The function may use these for determining context. For the "custom"
17021702argument, it is not necessary to filter candidates against the (implicit
17031703pattern in) ArgLead. Vim will filter the candidates with its regexp engine
1704- after function return, and this is probably more efficient in most cases. If
1704+ after function return, and this is probably more efficient in most cases. If
17051705'wildoptions' contains "fuzzy", then the candidates will be filtered using
17061706| fuzzy-matching | . For the "customlist" argument, Vim will not
17071707filter the returned completion candidates and the user supplied function
@@ -1833,8 +1833,8 @@ The valid escape sequences are
18331833 command was executed with a ! modifier, otherwise
18341834 expands to nothing.
18351835 *<mods>* *<q-mods>* *:command-modifiers*
1836- <mods> The command modifiers, if specified. Otherwise, expands to
1837- nothing. Supported modifiers are | :aboveleft | , | :belowright | ,
1836+ <mods> The command modifiers, if specified. Otherwise, expands to
1837+ nothing. Supported modifiers are | :aboveleft | , | :belowright | ,
18381838 | :botright | , | :browse | , | :confirm | , | :hide | , | :horizontal | ,
18391839 | :keepalt | , | :keepjumps | , | :keepmarks | , | :keeppatterns | ,
18401840 | :leftabove | , | :lockmarks | , | :noautocmd | , | :noswapfile | ,
@@ -1943,9 +1943,9 @@ A more substantial example: >
19431943 :endfunction
19441944 :command -nargs=+ -complete=command Allargs call Allargs(<q-args>)
19451945
1946- The command Allargs takes any Vim command(s) as argument and executes it on all
1947- files in the argument list. Usage example (note use of the "e" flag to ignore
1948- errors and the "update" command to write modified buffers): >
1946+ The command Allargs takes any Vim command(s) as argument and executes it on
1947+ all files in the argument list. Usage example (note use of the "e" flag to
1948+ ignore errors and the "update" command to write modified buffers): >
19491949 :Allargs %s/foo/bar/ge|update
19501950 This will invoke: >
19511951 :call Allargs("%s/foo/bar/ge|update")
0 commit comments