13
|
1 |
|
|
2 |
# Emacs mode bindings |
|
3 |
|
|
4 |
bindkey -e |
|
5 |
|
|
6 |
#bindkey '^Q' quoted-insert |
|
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 |
|
11 |
bindkey '^[^I' reverse-menu-complete # ESC-Tab |
|
12 |
bindkey '^Xc' copy-prev-word |
|
13 |
bindkey '^Xf' _correct_filename |
|
14 |
bindkey '^Xm' _most_recent_file |
|
15 |
|
|
16 |
bindkey -s '' '/' |
|
17 |
bindkey -s '' ',' |
|
18 |
|
|
19 |
# Sur la console |
|
20 |
if [[ "$TERM" == "console" || "$TERM" == "vt100" ]]; then |
|
21 |
bindkey '^[[1~' beginning-of-line # Home |
|
22 |
bindkey '^[[4~' end-of-line # End |
|
23 |
fi |
|
24 |
|
|
25 |
# Dans un xterm term=linux |
|
26 |
if [[ -z ${TERM:#linux*} || -z ${TERM:#screen} ]]; then |
|
27 |
bindkey '^[[H' beginning-of-line # Home |
|
28 |
bindkey '^[[F' end-of-line # End |
|
29 |
bindkey '[1~' beginning-of-line # Home |
|
30 |
bindkey '[4~' end-of-line # End |
|
31 |
fi |
|
32 |
|
|
33 |
# Dans un xterm |
|
34 |
if [[ -z ${TERM:#xterm*} ]]; then |
|
35 |
bindkey '^[[H' beginning-of-line # Home |
|
36 |
bindkey '^[[F' end-of-line # End |
|
37 |
bindkey '[1~' beginning-of-line # Home |
|
38 |
bindkey '[4~' end-of-line # End |
|
39 |
fi |
|
40 |
|
|
41 |
# Dans un rxvt |
|
42 |
if [[ -z ${TERM:#rxvt*} ]]; then |
|
43 |
bindkey '^[[7~' beginning-of-line # Home |
|
44 |
bindkey '^[[8~' end-of-line # End |
|
45 |
fi |
|
46 |
|
|
47 |
# Sur un xterm, on differencie backspace et delete (?). |
|
48 |
if [[ -z ${TERM:#xterm*} ]] |
|
49 |
then |
|
50 |
bindkey '^H' backward-delete-char # Backspace |
|
51 |
bindkey '^?' backward-delete-char # Backspace |
|
52 |
fi |