Q: How do I set vi key binding for mysql
I'm running OS 10.11.1 and I want to use vi as my editor while in mysql. I tried creating a ~/.inputrc with:
set editing-mode vi
set keymap vi-command
It did not work, so I tried a ~/.editrc with the same. That did not work so I tried a ~./bashrc file with the same, and with just "set -o vi". None worked. I still have emacs as my editor while in mysql. I'm running MySql 5.6.21.
OS X El Capitan (10.11.1)
Posted on Nov 10, 2015 5:45 PM
by Felixmeco,Solvedanswer
Adding 'bind -v' (without the quotes) to ~/.editrc did the trick.
$> cat ~/.editrc
bind -v
Posted on Nov 10, 2015 11:36 PM