From 65eb6a68255414bd2e0b82f7484a8f4804177c43 Mon Sep 17 00:00:00 2001 From: Nicholas Tay Date: Sat, 10 Apr 2021 09:34:55 +1000 Subject: Add in inputrc (for vi mode in bash, etc) --- .inputrc | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .inputrc diff --git a/.inputrc b/.inputrc new file mode 100644 index 0000000..afb20bf --- /dev/null +++ b/.inputrc @@ -0,0 +1,49 @@ +$include /etc/inputrc +set editing-mode vi +set bell-style none + +# tab complete quick +set show-all-if-ambiguous on +set show-all-if-unmodified on +TAB: menu-complete +"\e[Z": menu-complete-backward +set menu-complete-display-prefix on + +# all the colours +# Color files by types +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 + +# Clear screen +Control-l: clear-screen + +$if mode=vi +# different cursors for vi modes (archwiki) +set show-mode-in-prompt on +set vi-ins-mode-string \1\e[6 q\2 +set vi-cmd-mode-string \1\e[2 q\2 + +# (wiki: history substring search stuff) +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 +Control-l: clear-screen +set keymap vi-insert +# these are for vi-insert mode +"\e[A": history-search-backward +"\e[B": history-search-forward +Control-l: clear-screen +$endif + +# no beep +set bell-style none -- cgit