radian: Keybind to exit vim mode and prompt indication format
I would like to map jj to exit insert mode (i.e switch to navigation mode). Is this possible?
Also can we format the text that indicates the current vi mode? Currently in the config I have:
options(radian.vi_mode_prompt = "\033[0;35m({})\033[0m")
and insert mode is shown as (ins). I would like to replace it by (I).
Thanks in advance
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (10 by maintainers)
I have just pushed d3bd041 which allows running user hooks.
Given that you have some experience of working with
prompt-toolkit, try the following hook function.Ultimately, I want to expose these things directly to R users, for example via an R package
radianapi.app$session$modes$r$prompt_key_bindingswill only apply the keybindings to the regular R mode. Useapp$session$modes$r$key_bindingsif you want all the keys to be enabled in all modes.You could use the following to get normal mode.
By the way, if you want debug mode only keybindings, use
app$session$modes$browse$prompt_key_bindings.