Mysql
 sql >> Database >  >> RDS >> Mysql

Avere K simile a Vim in Screen for MySQL

Supponendo che tu abbia installato le pagine man dal sito di documentazione di MySQL :

Inserisci quanto segue in /path/to/mysql-help.screen :

# mysql-help.screen

# prevent messages from slowing this down
msgminwait 0
# copy term starting at cursor
copy
stuff " e "
# write term to a file
writebuf /tmp/screen-copied-term
# open that file in man in a new screen window
# (use `read` to pause on error, so user can see error message)
screen /bin/sh -c 'man `cat /tmp/screen-copied-term` || read'
# turn message waiting back on
msgminwait 1

# vi: ft=screen

Quindi aggiungilo al tuo ~/.screenrc

# Have CTRL-A ESC put you in a mode to accept commands in the 'escaped' class
bind \033 command -c escaped
# add CTRL-M as an 'escaped' class command to run the given screen script
bind -c escaped ^M source /path/to/mysql-help.screen

Quindi la tua combinazione di tasti dovrebbe funzionare. Se stai usando un programma diverso per visualizzare il manuale diverso da man , dovrai modificare lo script di conseguenza.

L'man le pagine per mysql che ho trovato al link sopra includono solo la documentazione per i seguenti comandi:

Potresti anche prendere in considerazione l'aggiunta

zombie kr

al tuo .screenrc , in modo che se esegui il manuale su un termine che non riconosce, lo schermo non chiude automaticamente la finestra (e nasconde il messaggio di errore).