diff options
Diffstat (limited to '.config/inputrc')
| -rw-r--r-- | .config/inputrc | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/.config/inputrc b/.config/inputrc new file mode 100644 index 0000000..adfeec4 --- /dev/null +++ b/.config/inputrc @@ -0,0 +1,86 @@ +$include /etc/inputrc + +"\f": clear-screen + +set bell-style none +set meta-flag on +set input-meta on +set convert-meta off +set output-meta on +set show-all-if-ambiguous on # set show-all-if-unmodified on + +# Color files by types +# Note that this may cause completion text blink in some terminals (e.g. xterm). +set colored-stats On +# Append char to indicate type +set visible-stats On +# Mark symlinked directories +set mark-symlinked-directories On +# Color the common prefix +set colored-completion-prefix On +# Color the common prefix in menu-complete +set menu-complete-display-prefix On + +# set editing-mode vi +set show-mode-in-prompt on +set keyseq-timeout 0 # Reduce the delay between pressing escape and the cursor change +set vi-cmd-mode-string "\1\e[2 q\2" +set vi-ins-mode-string "\1\e[6 q\2" + +$if mode=vi + set keymap vi-command + # these are for vi-command mode + "\e[A": history-search-backward + "\e[B": history-search-forward + j: history-search-forward + k: history-search-backward + set keymap vi-insert + # these are for vi-insert mode + "\e[A": history-search-backward + "\e[B": history-search-forward + "jk" # escape +$endif + +$if mode=emacs + + "\C-P": history-search-backward + "\C-N": history-search-forward + + # for linux console and RH/Debian xterm + "\e[1~": beginning-of-line + "\e[4~": end-of-line + "\e[5~": beginning-of-history + "\e[6~": end-of-history + "\e[7~": beginning-of-line + "\e[3~": delete-char + "\e[2~": quoted-insert + "\e[5C": forward-word + "\e[5D": backward-word + "\e\e[C": forward-word + "\e\e[D": backward-word + "\e[1;5C": forward-word + "\e[1;5D": backward-word + + # for rxvt + "\e[8~": end-of-line + + # for non RH/Debian xterm, can't hurt for RH/DEbian xterm + "\eOH": beginning-of-line + "\eOF": end-of-line + + # for freebsd console + "\e[H": beginning-of-line + "\e[F": end-of-line + +$endif + +#set editing-mode emacs +set editing-mode vi + +# # switch between vi or emacs +# set keymap emacs +# "\e[": vi-editing-mode +# set keymap vi-insert +# "\e[": emacs-editing-mode +# set keymap vi-command +# "\e[": emacs-editing-mode |
