diff options
author | Matt Wozniski <godlygeek@gmail.com> | 2020-10-04 02:37:45 -0400 |
---|---|---|
committer | Matt Wozniski <godlygeek@gmail.com> | 2020-10-05 15:27:04 -0400 |
commit | 2f06413dfb3624381f112b7d8661fde659c279e7 (patch) | |
tree | 59279a7d604e0eae8651dc140d1431e863a9d1a3 /runtime | |
parent | f6ac375604238c94d3dc3eeb9b82e67417460806 (diff) | |
download | rneovim-2f06413dfb3624381f112b7d8661fde659c279e7.tar.gz rneovim-2f06413dfb3624381f112b7d8661fde659c279e7.tar.bz2 rneovim-2f06413dfb3624381f112b7d8661fde659c279e7.zip |
Treat unmapped ALT/META as ESC+c in all modes
In #8226 <A-x> and <M-x> were changed to behave like <Esc>x in insert
mode when no mapping exists. This commit backs out that change and
replaces it with a more general one that makes unmapped ALT and META
keypresses as <Esc>+char in all modes. This fixes an unnecessary and
confusing inconsistency between modes.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/cmdline.txt | 4 | ||||
-rw-r--r-- | runtime/doc/insert.txt | 4 | ||||
-rw-r--r-- | runtime/doc/intro.txt | 2 | ||||
-rw-r--r-- | runtime/doc/vim_diff.txt | 2 | ||||
-rw-r--r-- | runtime/doc/visual.txt | 5 |
5 files changed, 13 insertions, 4 deletions
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index 163dc81804..f7a281cb88 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -224,6 +224,10 @@ CTRL-[ *c_CTRL-[* *c_<Esc>* *c_Esc* present in 'cpoptions', start entered command. Note: If your <Esc> key is hard to hit on your keyboard, train yourself to use CTRL-[. + *c_META* *c_ALT* + ALT (|META|) acts like <Esc> if the chord is not mapped. + For example <A-x> acts like <Esc>x if <A-x> does not have a + command-line mode mapping. *c_CTRL-C* CTRL-C quit command-line without executing diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index e53af5074b..c4b93a2a27 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -42,9 +42,9 @@ char action ~ abbreviation. Note: If your <Esc> key is hard to hit, try CTRL-[ instead. *i_META* *i_ALT* - ALT (|META|) acts like <Esc> if the chord is not mapped. + ALT (|META|) acts like <Esc> if the chord is not mapped. For example <A-x> acts like <Esc>x if <A-x> does not have an - insert-mode mapping. + insert-mode mapping. *i_CTRL-C* CTRL-C Quit insert mode, go back to Normal mode. Do not check for abbreviations. Does not trigger the |InsertLeave| autocommand diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 59b1f44e39..d858985e3f 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -382,6 +382,8 @@ Note: <k1>, ..., <k9> and <kPoint> will not work. - Nvim supports mapping multibyte chars with modifiers such as `<M-รค>`. Which combinations actually work depends on the the UI or host terminal. +- When a key is pressed using a meta or alt modifier and no mapping exists + for that keypress, Nvim behaves as though <Esc> was pressed before the key. *<>* Examples are often given in the <> notation. Sometimes this is just to make diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 3090be82f2..ae60c1c5e8 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -195,7 +195,7 @@ Input/Mappings: <M-1>, <M-BS>, <M-Del>, <M-Ins>, <M-/>, <M-\>, <M-Space>, <M-Enter>, etc. Case-sensitive: <M-a> and <M-A> are two different keycodes. - ALT in insert-mode behaves like <Esc> if not mapped. |i_ALT| + ALT behaves like <Esc> if not mapped. |i_ALT| |v_ALT| |c_ALT| Normal commands: |g<Tab>| goes to the last-accessed tabpage. diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index 0052382044..fd3d93ed98 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -159,7 +159,10 @@ If you want to highlight exactly the same area as the last time, you can use *v_<Esc>* <Esc> In Visual mode: Stop Visual mode. - + *v_META* *v_ALT* + ALT (|META|) acts like <Esc> if the chord is not mapped. + For example <A-x> acts like <Esc>x if <A-x> does not have a + visual-mode mapping. *v_CTRL-C* CTRL-C In Visual mode: Stop Visual mode. When insert mode is pending (the mode message shows |