aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/map.txt
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-06-04 10:53:42 +0200
committerGitHub <noreply@github.com>2022-06-04 10:53:42 +0200
commitdf4ffce543ba0d4e2464b3978f4e66eaddf6a29a (patch)
treea13cdda09151c4e36919fbe279b968732f76fe97 /runtime/doc/map.txt
parent9961a9702e75d80e6d37637182f361320e690002 (diff)
downloadrneovim-df4ffce543ba0d4e2464b3978f4e66eaddf6a29a.tar.gz
rneovim-df4ffce543ba0d4e2464b3978f4e66eaddf6a29a.tar.bz2
rneovim-df4ffce543ba0d4e2464b3978f4e66eaddf6a29a.zip
vim-patch:partial:cfa8f9a3f285 (#18858)
Update runtime files https://github.com/vim/vim/commit/cfa8f9a3f285060152ebbdbf86fbc7aecf1dd756 skip syntax/vim.vim (needs 8.2.4770) skip doc/syntax.vim (needs several colorscheme patches) skip further rewrite of manual
Diffstat (limited to 'runtime/doc/map.txt')
-rw-r--r--runtime/doc/map.txt25
1 files changed, 21 insertions, 4 deletions
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 9776304c8e..59a5a63e16 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -48,6 +48,7 @@ modes.
allows for nested and recursive use of mappings.
Note: Trailing spaces are included in the {rhs},
because space is a valid Normal mode command.
+ See |map-trailing-white|.
*:nore* *:norem*
:no[remap] {lhs} {rhs} |mapmode-nvo| *:no* *:noremap* *:nor*
@@ -85,10 +86,8 @@ modes.
for other modes where it applies.
It also works when {lhs} matches the {rhs} of a
mapping. This is for when an abbreviation applied.
- Note: Trailing spaces are included in the {lhs}. This
- unmap does NOT work: >
- :map @@ foo
- :unmap @@ | print
+ Note: Trailing spaces are included in the {lhs}.
+ See |map-trailing-white|.
:mapc[lear] |mapmode-nvo| *:mapc* *:mapclear*
:nmapc[lear] |mapmode-n| *:nmapc* *:nmapclear*
@@ -152,6 +151,24 @@ that mapping won't get expanded yet, Vim is waiting for another character.
If you type a space, then "foo" will get inserted, plus the space. If you
type "a", then "bar" will get inserted.
+Trailing white space ~
+ *map-trailing-white*
+This unmap command does NOT work: >
+ :map @@ foo
+ :unmap @@ | print
+
+Because it tries to unmap "@@ ", including the white space before the command
+separator "|". Other examples with trailing white space: >
+ unmap @@
+ unmap @@ " comment
+
+An error will be issued, which is very hard to identify, because the ending
+whitespace character in `unmap @@ ` is not visible.
+
+A generic solution is to put the command separator "|" right after the mapped
+keys. After that white space and a comment may follow: >
+ unmap @@| " comment
+
1.2 SPECIAL ARGUMENTS *:map-arguments*