views:

174

answers:

2

I have vi bindings working in my bash shell using set -o vi in my .bash_profile. But I can't seem to get them to work in the mysql command line client. I only get emacs style bindings. How do you do this?

I also put these lines in my .inputrc, but to with no effect:

set editing-mode vi
set keymap vi
+1  A: 

Quick google reveals this... don't know if it helps.

John Weldon
Thanks. Creating an .editrc worked!
dan
A: 

This doesn't directly answer your question, but you might want to take a look at the dbext plugin.

This plugin contains functions/mappings/commands to enable Vim to access several databases.

[...]

dbext provides a common interface between your editor and a database. If your company/project moves onto a new database platform, there is no need to learn the new databases tools. While editing your SQL (and without leaving Vim) you can execute database commands, run queries, display results, and view database objects. dbext understands various programming languages, and can parse and prompt the user for [host] variables and execute the resulting statement. See below for more details.

A database client inside Vim!

kemp