vim-patch:8.2.1978: making a mapping work in all modes is complicated

Problem:    Making a mapping work in all modes is complicated.
Solution:   Add the <Cmd> special key. (Yegappan Lakshmanan, closes vim/vim#7282,
            closes 4784, based on patch by Bjorn Linse)

957cf67d50

Change docs to match Vim if it's wording is better.
Change error numbers to match Vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-05-07 08:12:42 +08:00
parent 1cbfed03c2
commit a2b9117ca8
6 changed files with 494 additions and 21 deletions

View File

@@ -90,7 +90,7 @@ describe('mappings with <Cmd>', function()
{1:~ }|
{1:~ }|
{1:~ }|
{2:E5521: <Cmd> mapping must end with <CR> before second <Cmd>} |
{2:E1136: <Cmd> mapping must end with <CR> before second <Cmd>} |
]])
command('noremap <F3> <Cmd>let x = 3')
@@ -103,7 +103,7 @@ describe('mappings with <Cmd>', function()
{1:~ }|
{1:~ }|
{1:~ }|
{2:E5520: <Cmd> mapping must end with <CR>} |
{2:E1135: <Cmd> mapping must end with <CR>} |
]])
eq(0, eval('x'))
end)