up
This commit is contained in:
32
lua/kickstart/plugins/better-escape.lua
Normal file
32
lua/kickstart/plugins/better-escape.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
-- better-escape
|
||||
--
|
||||
-- A lot of people have mappings like jk or jj to escape insert mode.
|
||||
-- The problem with this mappings is that whenever you type a j,
|
||||
-- neovim wait about 100-500ms (depending on your timeoutlen) to see,
|
||||
-- if you type a j or a k because these are mapped.
|
||||
-- Only after that time the j will be inserted.
|
||||
-- Then you always get a delay when typing a j.
|
||||
--
|
||||
-- https://github.com/max397574/better-escape.nvim
|
||||
--
|
||||
|
||||
return {
|
||||
{
|
||||
'max397574/better-escape.nvim',
|
||||
config = function()
|
||||
require('better_escape').setup {
|
||||
timeout = vim.o.timeoutlen, -- after `timeout` passes, you can press the escape key and the plugin will ignore it
|
||||
default_mappings = false, -- setting this to false removes all the default mappings
|
||||
mappings = {
|
||||
-- i for insert
|
||||
i = {
|
||||
j = {
|
||||
-- These can all also be functions
|
||||
j = '<Esc>',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user