Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with arrow keys, spuriously enters insert mode & modifies another buffer #18

Open
poetaman opened this issue Jan 28, 2021 · 2 comments

Comments

@poetaman
Copy link

poetaman commented Jan 28, 2021

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.

@poetaman poetaman changed the title Problem with arrow keys, spuriously entering insert mode & modifying the file Problem with arrow keys, spuriously enters insert mode & modifies another buffer Jan 28, 2021
@mihaifm
Copy link
Owner

mihaifm commented Jan 28, 2021

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>"

@poetaman
Copy link
Author

@mihaifm Thanks, for now I am using the <Tab> key!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants