Update documentation

Update vim_diff.txt with :lmap differences, update documentation on
'keymap', and add tests.

The tests added are to demonstrate the behaviour specified in the
documentation of :loadkeymap.
This commit is contained in:
Matthew Malcomson
2017-06-01 09:20:56 +01:00
parent 3b304fc04a
commit cc58ec9a80
4 changed files with 27 additions and 4 deletions

View File

@@ -215,4 +215,19 @@ describe("'keymap' / :lmap", function()
feed('il')
expect('aalllaaa')
end)
it('does not cause recursive mappings', function()
command('lmap a l')
feed('qaila<esc>q')
expect('allllaaa')
feed('u@a')
expect('allllaaa')
end)
it('can handle multicharacter mappings', function()
command("lmap 'a x")
command("lmap '' '")
feed("qai'a''a<esc>q")
expect("x'alllaaa")
feed('u@a')
expect("x'alllaaa")
end)
end)