When using the MySQL command line interface, is there any way to get it to let you use vi command editing keys instead of emacs?


The MySQL command line interface uses readline to edit a command line.

Create a file ~/.inputrc with the following content to use vi mode:

$if mysql
set editing-mode vi

Of course, if you want to use vi mode in all applications (including e.g. bash) that use readline, you can leave out the $if & $endif ... lines...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.