I'm trying to map jj to <Esc> but it's not working as expected.
I've tried adding these to keymaps in my init.lua, but it's not behaving as expected:
vim.keymap.set('i', 'jj', '<Esc>', { noremap = true })
vim.api.nvim_set_keymap('i', 'jj', '<Esc>', { noremap = true, silent = true })
The problem is that when I press and hold j it types two j's and then escapes to normal more and removes one of the j's, leaving one j inserted before it goes to normal mode.
In my old .vimrc (not neovim) I had this imap jj <Esc> and it worked as expected
I'm working off a fresh clone of kickstart.nvim: https://github.com/nvim-lua/kickstart.nvim/blob/master/init.lua (@ commit d0b47ce)
It works fine for me. I think problem lies in your os settings or keyboard interval time.