# ~/.tcshrc.bindkey # A few tweaks aside, everything below comes from the tcshrc project # tcshrc.sourceforge.net # ####### # $Id: tcshrc.bindkey,v 1.9 2004/08/14 14:31:04 simos Exp $ # example file using the new bindkey code # # Debian enhancements by Vadim Vygonets <vadik@cs.huji.ac.il>. # Cleanup by Martin A. Godisch <martin@godisch.de>. # INSERT : toggles overwrite or insert mode. bindkey [2~ overwrite-mode # DELETE : delete char at cursor position. bindkey [3~ delete-char # HOME : go to the beginning of the line. bindkey [1~ beginning-of-line # END : go to the end of the line. bindkey [4~ end-of-line # PAGE UP : search in history backwards for line beginning as current. bindkey [5~ history-search-backward # PAGE DOWN : search in history forwards for line beginning as current. bindkey [6~ history-search-forward # ESC-left-arrow : go to beginning of left word. # The second version is used to fix a strange bug where the binding # stops working after some usage. Did not manage to recreate. bindkey  vi-word-back bindkey OD vi-word-back # ESC-right-arrow : go to beginning of right word. # The second version is used to fix a strange bug where the binding # stops working after some usage. Did not manage to recreate. bindkey  vi-word-fwd bindkey OC vi-word-fwd # F1 : help on command currently typed(if 'ls passwd', help on 'ls'). # first: while in console mode, second: while in X bindkey [[A run-help bindkey OP run-help # F2 : set the mark command to cursor position. # first: while in console mode, second: while in X bindkey [[B set-mark-command bindkey OQ set-mark-command # F3 : move cursor to the marked position. # first: while in console mode, second: while in X bindkey [[C exchange-point-and-mark bindkey OR exchange-point-and-mark # F4 : --empty-- # first: while in console mode, second: while in X bindkey [[D undefined-key bindkey OS undefined-key # F5 : check line for spelling and make changes. # first: while in console mode, second: while in X bindkey [[E spell-line bindkey [15~ spell-line # F6 : check current word for spelling and make changes. # same in both console and X modes bindkey [17~ spell-word # F7 : insert last item of previous command. bindkey [18~ insert-last-word # F8 : search in history backwards for line beginning as current. bindkey [19~ history-search-backward # F9 : clear screen. # You may be in the middle of a command when you use this. # Does not affect what you are writing at the moment. bindkey [20~ clear-screen # F10 : do an 'ls -l'. (\16 is Ctrl-U on Linux(and Sun?)) # Does not work on some xterm* (gnome-terminal). bindkey -s [21~ "\16ls -l\n" # F11 : display load average and current process status. # Does not work on Linux. Perhaps bug in tcsh? # Changed with running "uptime". ### bindkey ^[[23~ load-average # bindkey -s ^[[23~ "\16uptime\n" #### Disabled! According to users, it is close to F12, which is used for unconditional #### completion. In several cases (laptop keyboard) it is common to make a mistake #### and press F11 instead of F12, such as in the case #### root# cp /etc/passwd /etc/pas<F11> #### In this case, the commande changes to #### root# cp /etc/passwd /etc/pasuptime<ENTER> #### and you get a rubbish file /etc/pasuptime. Annoying! # F12 : do a ala-csh completion. # bindkey ^[[24~ complete-word-raw ####################################### # Advanced settings # Thanks to Carlos Duarte <cgd@teleweb.pt> # Eazy edit of path, type Ctrl-X p bindkey -s '^Xp' '. `echo $path`^X*)^A^Dset path = ( ' # Ctrl-X * Expand glob. example: ls *<^X*> will expand the line # default behaviour # Ctrl-X $ Expand variables. example: $TERM<^X$> with give vt100 # default behaviour