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

Vi style keybindings in iex #4533

Closed
sbdchd opened this issue Apr 19, 2016 · 4 comments
Closed

Vi style keybindings in iex #4533

sbdchd opened this issue Apr 19, 2016 · 4 comments

Comments

@sbdchd
Copy link

sbdchd commented Apr 19, 2016

In ipython, irb, and thepython REPL, Vi style keybindings can be enabled via the .inputrc file.

However, this doesn't work with iex.

Environment

  • Elixir version (elixir -v): 1.2.4
  • Operating system: OSX 10.10.5
@parkerl
Copy link
Contributor

parkerl commented Apr 19, 2016

I'm not sure this is the right place for this issue but I have had good luck with rlwrap and vi bindings on OS X. I have this alias alias iex='rlwrap -m ''\'' -a dummy iex. Sorry I don't have access to all my dotfiles right now, can't remember how I have vi bindings enabled.

@josevalim
Copy link
Member

It is not possible because we are tied to Erlang's bindings and it is not high priority to do so. :)

@parkerl
Copy link
Contributor

parkerl commented Apr 19, 2016

@sbdchd .inputrc is picked up by rlwrap. Using the alias above you can set vi mode and it works well for me in iex.

#.inputrc
set editing-mode vi

@arcseldon
Copy link

You lose auto-completion, but rlwrap does work as others have pointed out. More info here:

https://elixirforum.com/t/iex-vi-command-line-editing/3365

https://gist.github.com/jfreeze/8894279

You cannot have vi bindings through rlwrap AND command completion at the same time.
The author of rlwrap explains the reason here: http://stackoverflow.com/questions/9210931/is-there-a-way-of-running-rlwrap-with-tab-completion-disabled

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

No branches or pull requests

4 participants