-- 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 = '', }, }, }, } end, }, }