summaryrefslogtreecommitdiffstats
path: root/runtime/doc/map.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/map.txt')
-rw-r--r--runtime/doc/map.txt13
1 files changed, 12 insertions, 1 deletions
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index cfd48b5a78..276ab50509 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1,4 +1,4 @@
-*map.txt* For Vim version 8.2. Last change: 2020 Sep 09
+*map.txt* For Vim version 8.2. Last change: 2020 Oct 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -252,6 +252,17 @@ For abbreviations |v:char| is set to the character that was typed to trigger
the abbreviation. You can use this to decide how to expand the {lhs}. You
should not either insert or change the v:char.
+In case you want the mapping to not do anything, you can have the expression
+evaluate to an empty string. If something changed that requires Vim to
+go through the main loop (e.g. to update the display), return "\<Ignore>".
+This is similar to "nothing" but makes Vim return from the loop that waits for
+input. Example: >
+ func s:OpenPopup()
+ call popup_create(... arguments ...)
+ return "\<Ignore>"
+ endfunc
+ nnoremap <expr> <F3> <Sid>OpenPopup()
+
Be very careful about side effects! The expression is evaluated while
obtaining characters, you may very well make the command dysfunctional.
For this reason the following is blocked: