diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-10-11 13:57:40 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-10-11 13:57:40 +0200 |
commit | 4f4d51a942cc2c6b3e936ee0f93f00c2d000065c (patch) | |
tree | 68c8e3f28d26abf029d6d67747897b1bf43b885c /runtime/doc/map.txt | |
parent | c6ed254d9fda0ff54cdedce5597ff3e0d0218d18 (diff) |
Update runtime files.
Diffstat (limited to 'runtime/doc/map.txt')
-rw-r--r-- | runtime/doc/map.txt | 13 |
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: |