Problem with arrow keys, spuriously enters insert mode & modifies another buffer
Opened this issue · 2 comments
Pressing arrow keys takes me out of the Bufstop window, and even worse it starts insert mode and inserts one of: A/B/C/D for respective: <Up><Down><Left><Right>. I have never encountered this with any other buffer/mode combination in my terminal. I like the rest of the UI.
The issue happens because the plugin remaps the <Esc>
key, which is also used as a control character by terminals. For example, <down>
is being sent as <Esc>OB
(this depends on the terminal). Because <Esc>
is remapped, Vim no longer recognizes the sequence and only executes OB
, which basically means open another line and write B.
I am trying to find a solution, but in the meantime you can use the configuration option g:BufstopDismissKey
. Add this to your vimrc:
let g:BufstopDismissKey = "<Esc><Esc>"
This resolves the arrow keys issue but now you need to double press Esc to close the Bufstop window. You can also use another key or combination:
let g:BufstopDismissKey = "<Tab>"