mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
docs: clarify actual behavior of <Plug>
This commit is contained in:
parent
cf0266fae1
commit
0cb9a577ed
@ -65,9 +65,8 @@ modes.
|
||||
where the map command applies. Disallow mapping of
|
||||
{rhs}, to avoid nested and recursive mappings. Often
|
||||
used to redefine a command.
|
||||
Note: "nore" is ignored for a mapping whose result
|
||||
starts with <Plug>. <Plug> is always remapped even if
|
||||
"nore" is used.
|
||||
Note: A mapping whose {lhs} starts with <Plug> is
|
||||
always applied even if mapping is disallowed.
|
||||
|
||||
|
||||
:unm[ap] {lhs} |mapmode-nvo| *:unm* *:unmap*
|
||||
|
@ -358,6 +358,10 @@ Macro/|recording| behavior
|
||||
macros and 'keymap' at the same time. This also means you can use |:imap| on
|
||||
the results of keys from 'keymap'.
|
||||
|
||||
Mappings:
|
||||
- A mapping whose {lhs} starts with <Plug> is always applied even if mapping
|
||||
is disallowed by |nore|.
|
||||
|
||||
Motion:
|
||||
The |jumplist| avoids useless/phantom jumps.
|
||||
|
||||
@ -442,9 +446,6 @@ Working directory (Vim implemented some of these later than Nvim):
|
||||
- `getcwd(-1)` is equivalent to `getcwd(-1, 0)` instead of returning the global
|
||||
working directory. Use `getcwd(-1, -1)` to get the global working directory.
|
||||
|
||||
Mappings:
|
||||
- |nore| is ignored for rhs <Plug> mappings. <Plug> mappings are always remapped.
|
||||
|
||||
==============================================================================
|
||||
5. Missing legacy features *nvim-features-missing*
|
||||
|
||||
|
@ -30,7 +30,7 @@ describe(':*map', function()
|
||||
expect('-foo-')
|
||||
end)
|
||||
|
||||
it('<Plug> keymaps ignore nore', function()
|
||||
it('<Plug> mappings ignore nore', function()
|
||||
command('let x = 0')
|
||||
eq(0, meths.eval('x'))
|
||||
command [[
|
||||
@ -43,7 +43,8 @@ describe(':*map', function()
|
||||
feed('increase_x_noremap')
|
||||
eq(2, meths.eval('x'))
|
||||
end)
|
||||
it("Doesn't auto ignore nore for keys before or after <Plug> keymap", function()
|
||||
|
||||
it("Doesn't auto ignore nore for keys before or after <Plug> mapping", function()
|
||||
command('let x = 0')
|
||||
eq(0, meths.eval('x'))
|
||||
command [[
|
||||
|
Loading…
Reference in New Issue
Block a user