Skip to content

Instantly share code, notes, and snippets.

@jfreeze
Last active August 1, 2024 17:34
Show Gist options
  • Select an option

  • Save jfreeze/8894279 to your computer and use it in GitHub Desktop.

Select an option

Save jfreeze/8894279 to your computer and use it in GitHub Desktop.
Get VI bindings in IEX (Elixir REPL)
# VI bindings in iex:
brew install rlwrap # on OSX
echo "alias iex='rlwrap -a foo iex'" >> ~/.bash_profile
echo "set editing-mode vi" >> ~/.inputrc
source ~/.bash_profile
@mkyed
Copy link

mkyed commented Feb 17, 2015

Thanx!

@chrisdambrosio
Copy link

Thanks for this

@dylan-chong
Copy link

alias iex='rlwrap -a foo iex'

What is the foo?

@led
Copy link

led commented Nov 24, 2017

The -a switch tells rlwrap to 'always remain in readline mode'. On OSX the -a option requires an argument, in this case a dummy argument foo.

@Lumuy
Copy link

Lumuy commented Feb 22, 2019

Thanks

alias iex='rlwrap -a iex'

On unbuntu, this worked for me.

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