Move cursor to prev/next word in Irb (Pry) Vi-style
A handy key binding to use in irb
to move cursor one word forward/backward that recognises dots as word separators:
echo 'bind "\\eb" vi-prev-word\nbind "\\ef" vi-next-word' >> .editrc
It will bind Meta-f
/Meta-b
to commands vi-next-word
& vi-prev-word
. This setting will affect not only irb
but every program that uses readline
(libedit
on MacOS X).
Make sure you have Meta key set up in your terminal.
For more info on editline
config see man editrc
Written by Irina Bednova
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#