better-escape.nvim
better-escape.nvim copied to clipboard
Is it possible to map different mappings with different keys?
require("better_escape").setup {
mapping = {"jk"}, -- 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()
-- keys = function()
-- return vim.api.nvim_win_get_cursor(0)[2] > 1 and '
This is my current config. But I have mapped 'kj' to abort/close nvim-cmp's auto-complete popup menu, so I would be interested in having another mapping "kj" to support that functionality.
So you want to map kj to esc (with better-escape.nvim)?
So you want to map kj to esc (with better-escape.nvim)?
I want to map jk to escape, and kj mapped to nvm.cmp.close()/nvim.cmp.abort()
so basically sou want two different keys
?
It's easy but out of scope for this plugin.