mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 14:55:33 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user