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-b to commands
vi-prev-word. This setting will affect not only
irb but every program that uses
libedit on MacOS X).
Make sure you have Meta key set up in your terminal.
For more info on
editline config see