mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
feat(defaults): dot-repeat [<Space> #31186
Problem: `[<Space>` and `]<Space>` do not support repetition. Solution: use `operatorfunc` and `g@l` to make these mappings dot repeatable.
This commit is contained in:
@@ -170,6 +170,30 @@ describe('default', function()
|
||||
|
||||
|
||||
|
||||
first line]])
|
||||
end)
|
||||
|
||||
it('supports dot repetition', function()
|
||||
n.clear({ args_rm = { '--cmd' } })
|
||||
n.insert([[first line]])
|
||||
n.feed('[<Space>')
|
||||
n.feed('.')
|
||||
n.expect([[
|
||||
|
||||
|
||||
first line]])
|
||||
end)
|
||||
|
||||
it('supports dot repetition and a count', function()
|
||||
n.clear({ args_rm = { '--cmd' } })
|
||||
n.insert([[first line]])
|
||||
n.feed('[<Space>')
|
||||
n.feed('3.')
|
||||
n.expect([[
|
||||
|
||||
|
||||
|
||||
|
||||
first line]])
|
||||
end)
|
||||
end)
|
||||
@@ -194,6 +218,29 @@ describe('default', function()
|
||||
|
||||
|
||||
|
||||
]])
|
||||
end)
|
||||
|
||||
it('supports dot repetition', function()
|
||||
n.clear({ args_rm = { '--cmd' } })
|
||||
n.insert([[first line]])
|
||||
n.feed(']<Space>')
|
||||
n.feed('.')
|
||||
n.expect([[
|
||||
first line
|
||||
|
||||
]])
|
||||
end)
|
||||
|
||||
it('supports dot repetition and a count', function()
|
||||
n.clear({ args_rm = { '--cmd' } })
|
||||
n.insert([[first line]])
|
||||
n.feed(']<Space>')
|
||||
n.feed('2.')
|
||||
n.expect([[
|
||||
first line
|
||||
|
||||
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user