Improve macro & dot-repeat support (#363)

* manual support dot-repeat

* cmdwin and terminal

* cmdline only

* Fix

* fix

* Improve

* Fix test

* Support macro

* disable cmdline for now

* Simplify

* fmt

* consume once

* Ignore = type

* cmdline

* Remove cmdline features
This commit is contained in:
hrsh7th
2021-10-16 23:37:32 +09:00
committed by GitHub
parent f0a6cca5b9
commit 0f28030aef
13 changed files with 279 additions and 84 deletions

View File

@@ -29,24 +29,6 @@ misc.concat = function(list1, list2)
return new_list
end
---Get cursor before line
---@return string
misc.get_cursor_before_line = function()
local cursor = vim.api.nvim_win_get_cursor(0)
return string.sub(vim.api.nvim_get_current_line(), 1, cursor[2])
end
---Return current mode is insert-mode or not.
---@return boolean
misc.is_suitable_mode = function()
local mode = vim.api.nvim_get_mode().mode
return vim.tbl_contains({
'i',
'ic',
'ix',
}, mode)
end
---Merge two tables recursively
---@generic T
---@param v1 T