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