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

HJKL slow reponse #85

Open
hurrtz opened this issue Oct 28, 2019 · 3 comments
Open

HJKL slow reponse #85

hurrtz opened this issue Oct 28, 2019 · 3 comments

Comments

@hurrtz
Copy link

hurrtz commented Oct 28, 2019

Hello :)

I have a weird bug which I can't really pinpoint to a specific misconfiguration. The problem is that when I start ranger from within neovim (haven't tested standard vim) then the HJKL keys are responding extremely slow. After having typed 'J' it can take up to two seconds for the selected row to move one item down. The arrow keys work fine, though! Also: Running ranger from outside vim behaves as expected. The described problem exist for all terminals I have used (xterm, urxvt, alacritty).

The only configuration I have for this plugin are:

let g:ranger_replace_netrw = 1
nnoremap <leader>F :RangerCurrentFileNewTab<CR>

In my vimrc I have done nothing to the HJKL keys, no remapping or overrides, although I don't think that this is relevant for ranger.

Since I seem to be the only one having that problem I am certain that this is a configuration thing, but I am not sure where to look. Thanks in advance for your help, though!

@mdxprograms
Copy link

I'm getting the same issue with neovim

@hurrtz
Copy link
Author

hurrtz commented Sep 29, 2020

Oh, sorry, forgot to follow up on my issue... I found ot the reason for my behaviour. It came from having a remap of the JK keys in neovim: Typing JK would trigger the ESC-key, so that you don't need to bother to reach so far and can stay on the home row. But Having this mapping means that neovim takes a second or so to see if after one key there's the other following the first. That's the delay. When I remove this specific mapping ranger works as expected. But since I don't want to lose this mapping I will just live with it, arrow keys work fine any way :)

@mdxprograms
Copy link

funny.. I figured that out as well after commenting.. I have jf mapped to insert mode for ESC so it causes the delay as well in navigation. It'd be better if the native ranger was able to be used and could switch back to vim on selection. I'm not sure if that's how it works today or not, but the vim bindings definitely block the default behavior in insert mode.

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