Hello list, I've been using the default mysql client whenever I need to use the database interactively. Its always been a hope of mine that it would support vi style key presses and command mode.
I found that you could change the default pager and then edit commands using vi, but this isn't as good as support in the actual client. I've done plenty searches but never found anything. Anyway I was banging away on the keyboard one day and suddenly I found I was using vi editing keys! I checked the source and found that the readline library was being used, which I knew supported vi keys, so it was pretty easy to find out how to switch from emacs to vi mode and visa versa (see vi_keymap.c and emacs_keymap.c), Meta-Control-j to switch to vi keys, and Control-j to go back to emacs. After finding this out, I then checked the man page for readline, and this is all clearly stated there too (as well as lots of other useful stuff). Matt -- #!/usr/bin/perl $A='A';while(print+($A.=(grep{($A=~/(...).{78}$/)[0]eq$_}" A A A " =~m{(...)}g)?"A":" ")=~/([ A])$/){if(!(++$l%80)){print"\n";sleep 1}} --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php