The Radare2 command line (I believe it's called "interactive mode"?) allows bringing back history and editing it with the arrow keys. However, I prefer to use vi/vim keybindings for this. How do I configure this?

I do have a $HOME/.inputrc file which contains set editing-mode vi, and this works for many programs (presumably all that use GNU Readline or a compatible library).

Alternatively, is there an option available to build Radare2 with Readline?

  • 1
    try e?? and grep both vi and tailsub like e??-vi or e??-tailsub
    – blabb
    May 30, 2020 at 11:26
  • @blabb I think you mean e??~vi, with a tilde instead of a hyphen, right?
    – cjs
    May 30, 2020 at 11:38
  • yeah tilde not hyphen blame it on android keyboard
    – blabb
    May 30, 2020 at 12:02
  • What what what? Where's the question: "How do I use vim keybindings in IDA". Totally jealous rn. Mar 1, 2021 at 11:15

1 Answer 1


You can e scr.prompt.vi = true to enable a limited form of vi key bindings for command line editing. However, this is very limited; it's even missing basic movement commands such as f and t, and some commands such as cw do not appear to work properly. Searching with vi keybindings is unavailable; you must still use the Emacs Ctrl-R syntax to search backwards in your history. And a special warning: Enter in command mode will do nothing; you must enter insert mode and press Enter to enter the command you've just brought up or edited.

(I found the setting by searching the configuration variables using e scr. ~vi; thanks to @blabb for mentioning this to me.)

Radare2 uses its own command line editing code, in libr/cons/dietline.c.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.