Decrease waits

This commit is contained in:
hrsh7th
2022-07-24 13:14:01 +09:00
parent bf5593df8e
commit 76ba56ce96
6 changed files with 18 additions and 11 deletions

View File

@@ -44,6 +44,7 @@ api.get_current_line = function()
return vim.api.nvim_get_current_line()
end
---@return { [1]: integer, [2]: integer }
api.get_cursor = function()
if api.is_cmdline_mode() then
return { vim.o.lines - (vim.api.nvim_get_option('cmdheight') or 1) + 1, vim.fn.getcmdpos() - 1 }

View File

@@ -68,7 +68,7 @@ keymap.undojoin = function()
end
---Create backspace keys.
---@param count integer
---@param count string|integer
---@return string
keymap.backspace = function(count)
if type(count) == 'string' then
@@ -83,7 +83,7 @@ keymap.backspace = function(count)
end
---Update indentkeys.
---@param expr string
---@param expr? string
---@return string
keymap.indentkeys = function(expr)
return string.format(keymap.t('<Cmd>set indentkeys=%s<CR>'), expr and vim.fn.escape(expr, '| \t\\') or '')