Modifying RStudio's vim keybindings

Hi folks!
I'm back in RStudio after a few years of developing in other editors with Vim keybindings. I love that you have out-of-the-box support in Tools>Global Options>Code. I noticed that there is a "Modify Keyboard Shortcuts" button next to the relevant dropdown, but I haven't been able to figure out how to modify the Vim bindings themselves.

Specifically, is it possible to rebind <Esc> to a combination of home-row keypresses? (E.g. I usually use <jj>). I'm used to making changes like this in .vimrc, but a quick dig didn't turn up a similar config file within .rstudio-desktop. Am I missing something? Is there a better way? Is it even possible to bind multiple consecutive keypresses to get me back into Normal mode with RStudio's Vim setup?

Thanks for your time,

Rstudio vim mode is advertised as a lightweight emulation. It's implemented in some stew of HTML CSS JS Java (see this) and it's surprising that it works as well as it does.

Thanks, @technocrat. Does that mean it is not possible or is nontrivial to rebind <Esc> to multiple home-row keypresses?

From the perspective of RStudio developers, probably not trivial; from the perspective of users probably not possible. I have similar desired shortcuts, but none have bothered me enough to attempt this; I'd probably try it through a keystroke daemon in the OS.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.