better-escape.nvim toegevoegd

This commit is contained in:
2024-02-07 17:01:18 +01:00
parent 897151daf9
commit 368ab924be
3 changed files with 19 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
return {
"max397574/better-escape.nvim",
lazy = false,
config = function()
-- lua, default settings
require("better_escape").setup({
mapping = { "jk", "jj" }, -- a table with mappings to use
timeout = vim.o.timeoutlen, -- the time in which the keys must be hit in ms. Use option timeoutlen by default
clear_empty_lines = false, -- clear line after escaping if there is only whitespace
keys = "<Esc>", -- keys used for escaping, if it is a function will use the result everytime
-- example(recommended)
-- keys = function()
-- return vim.api.nvim_win_get_cursor(0)[2] > 1 and '<esc>l' or '<esc>'
-- end,
})
end,
}