author | Mikael Berthe <mikael.berthe@cnamts.fr> |
Sun, 25 Apr 2021 13:40:43 +0200 | |
changeset 47 | f25fda256b1d |
parent 45 | c8b92fa96f48 |
child 48 | 604330c024f4 |
permissions | -rw-r--r-- |
13 | 1 |
|
2 |
# Emacs mode bindings |
|
3 |
||
4 |
bindkey -e |
|
5 |
||
6 |
#bindkey '^Q' quoted-insert |
|
45 | 7 |
bindkey '^[[2~' overwrite-mode # Ins |
8 |
bindkey '^[[3~' delete-char # Suppr |
|
9 |
bindkey '^[[5~' history-beginning-search-backward # PgUp |
|
10 |
bindkey '^[[6~' history-beginning-search-forward # PgDn |
|
13 | 11 |
bindkey '^[^I' reverse-menu-complete # ESC-Tab |
30
e26330cd408f
Use copy-prev-shell-word instead of copy-prev-word
Mikael Berthe <mikael@lilotux.net>
parents:
13
diff
changeset
|
12 |
bindkey '^Xc' copy-prev-shell-word |
13 | 13 |
bindkey '^Xf' _correct_filename |
14 |
bindkey '^Xm' _most_recent_file |
|
15 |
||
45 | 16 |
bindkey -s '' '^[/' |
17 |
bindkey -s '' '^[,' |
|
13 | 18 |
|
47 | 19 |
if [[ $TERM == "console" || $TERM == "vt100" || $TERM == linux* || |
20 |
$TERM == xterm* || $TERM == tmux* ]] |
|
21 |
then |
|
13 | 22 |
bindkey '^[[1~' beginning-of-line # Home |
23 |
bindkey '^[[4~' end-of-line # End |
|
24 |
fi |
|
25 |
||
26 |
# Dans un xterm term=linux |
|
27 |
if [[ -z ${TERM:#linux*} || -z ${TERM:#screen} ]]; then |
|
28 |
bindkey '^[[H' beginning-of-line # Home |
|
29 |
bindkey '^[[F' end-of-line # End |
|
30 |
fi |
|
31 |
||
32 |
# Dans un xterm |
|
33 |
if [[ -z ${TERM:#xterm*} ]]; then |
|
34 |
bindkey '^[[H' beginning-of-line # Home |
|
35 |
bindkey '^[[F' end-of-line # End |
|
45 | 36 |
|
37 |
# Sur un xterm, on differencie backspace et delete (?). |
|
38 |
bindkey '^H' backward-delete-char # Backspace |
|
39 |
bindkey '^?' backward-delete-char # Backspace |
|
13 | 40 |
fi |
41 |
||
42 |
# Dans un rxvt |
|
43 |
if [[ -z ${TERM:#rxvt*} ]]; then |
|
44 |
bindkey '^[[7~' beginning-of-line # Home |
|
45 |
bindkey '^[[8~' end-of-line # End |
|
46 |
fi |