Skip to content

Commit 26e4ad9

Browse files
committed
map.txt: Update Vim 8.2.5077
1 parent e824bd6 commit 26e4ad9

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

en/map.txt

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*map.txt* For Vim version 8.2. Last change: 2022 May 09
1+
*map.txt* For Vim version 8.2. Last change: 2022 Jun 02
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -63,6 +63,7 @@ modes.
6363
allows for nested and recursive use of mappings.
6464
Note: Trailing spaces are included in the {rhs},
6565
because space is a valid Normal mode command.
66+
See |map-trailing-white|.
6667

6768
*:nore* *:norem*
6869
:no[remap] {lhs} {rhs} |mapmode-nvo| *:no* *:noremap* *:nor*
@@ -100,10 +101,8 @@ modes.
100101
for other modes where it applies.
101102
It also works when {lhs} matches the {rhs} of a
102103
mapping. This is for when an abbreviation applied.
103-
Note: Trailing spaces are included in the {lhs}. This
104-
unmap does NOT work: >
105-
:map @@ foo
106-
:unmap @@ | print
104+
Note: Trailing spaces are included in the {lhs}.
105+
See |map-trailing-white|.
107106

108107
:mapc[lear] |mapmode-nvo| *:mapc* *:mapclear*
109108
:nmapc[lear] |mapmode-n| *:nmapc* *:nmapclear*
@@ -168,6 +167,27 @@ that mapping won't get expanded yet, Vim is waiting for another character.
168167
If you type a space, then "foo" will get inserted, plus the space. If you
169168
type "a", then "bar" will get inserted.
170169

170+
Trailing white space ~
171+
*map-trailing-white*
172+
This unmap command does NOT work: >
173+
:map @@ foo
174+
:unmap @@ | print
175+
176+
Because it tries to unmap "@@ ", including the white space before the command
177+
separator "|". Other examples with trailing white space: >
178+
unmap @@
179+
unmap @@ # Vim9 script comment
180+
unmap @@ " legacy comment
181+
182+
An error will be issued, which is very hard to identify, because the ending
183+
whitespace character in `unmap @@ ` is not visible.
184+
185+
A generic solution is to put the command separator "|" right after the mapped
186+
keys. After that white space and a comment may follow: >
187+
188+
unmap @@| # Vim9 scriptcomment
189+
unmap @@| " legacy scriptcomment
190+
171191
172192
1.2 SPECIAL ARGUMENTS *:map-arguments*
173193

@@ -701,6 +721,7 @@ not to be matched with any key sequence. This is useful in plugins
701721
*<MouseMove>*
702722
The special key name "<MouseMove>" can be used to handle mouse movement. It
703723
needs to be enabled with 'mousemoveevent'. Currently only works in the GUI.
724+
The |getmousepos()| function can be used to obtain the mouse position.
704725

705726
*<Char>* *<Char->*
706727
To map a character by its decimal, octal or hexadecimal number the <Char>

0 commit comments

Comments
 (0)