From 7a309311a2c6858c9cd59db47becf4c9baaa9bfe Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 20 Jun 2022 18:47:30 +0200 Subject: vim-patch:d799daa660b8 (#19031) Update runtime files https://github.com/vim/vim/commit/d799daa660b8821943cbe1682f00da9e812dd48c --- runtime/doc/builtin.txt | 2 +- runtime/doc/map.txt | 10 +--------- runtime/doc/visual.txt | 7 +++++++ 3 files changed, 9 insertions(+), 10 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 54eac87070..ac42b315a4 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -2364,7 +2364,7 @@ fnamemodify({fname}, {mods}) *fnamemodify()* Example: > :echo fnamemodify("main.c", ":p:h") < results in: > - /home/mool/vim/vim/src + /home/user/vim/vim/src < If {mods} is empty or an unsupported modifier is used then {fname} is returned. Note: Environment variables don't work in {fname}, use diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 2206d13053..05cf30e078 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -345,15 +345,7 @@ Note: mapping is recursive. - In Visual mode you can use `line('v')` and `col('v')` to get one end of the Visual area, the cursor is at the other end. -- In Select mode, |:map| and |:vmap| command mappings are executed in - Visual mode. Use |:smap| to handle Select mode differently. One particular - edge case: > - :vnoremap -< This ends Visual mode when in Visual mode, but in Select mode it does not - work, because Select mode is restored after executing the mapped keys. You - need to use: > - :snoremap -< + *E5520* commands must terminate, that is, they must be followed by in the {rhs} of the mapping definition. |Command-line| mode is never entered. diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index 193c70e70a..905ae49887 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -499,6 +499,13 @@ work both in Visual mode and in Select mode. When these are used in Select mode Vim automatically switches to Visual mode, so that the same behavior as in Visual mode is effective. If you don't want this use |:xmap| or |:smap|. +One particular edge case: > + :vnoremap +This ends Visual mode when in Visual mode, but in Select mode it does not +work, because Select mode is restored after executing the mapped keys. You +need to use: > + :snoremap +< Users will expect printable characters to replace the selected area. Therefore avoid mapping printable characters in Select mode. Or use |:sunmap| after |:map| and |:vmap| to remove it for Select mode. -- cgit