How to get vi keybindings to work in mysql client? How to get vi keybindings to work in mysql client? unix unix

How to get vi keybindings to work in mysql client?


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

Copied here for convenience:

Add the following on OS X 10.5:

$ cat .editrcbind -v

This will work for OS X 10.4 and other operating systems:

$ cat .inputrcset editing-mode vi


These two files worked on my previous workstation (not sure of the MySQL version (my old job)). I keep my dotFiles in git.

.editrc bind -v bind \\t rl_complete

.inputrc (several of these may or may-not be needed) set editing-mode vi set keymap vi set meta-flag on set input-meta on set convert-meta off set output-meta on set bell-style none

Posting these because I couldn't post them in my comment above.


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!