From c46221ed15fa086b94736aa3d3bddef3e72373ec Mon Sep 17 00:00:00 2001 From: "flyingscorpio@arch-desktop" Date: Wed, 27 May 2020 11:10:58 +0200 Subject: [PATCH] Add inputrc --- dotfiles/bash/inputrc | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 dotfiles/bash/inputrc diff --git a/dotfiles/bash/inputrc b/dotfiles/bash/inputrc new file mode 100644 index 0000000..c0e22b2 --- /dev/null +++ b/dotfiles/bash/inputrc @@ -0,0 +1,47 @@ +$include /etc/inputrc + +# Enable Vi-style shell +set editing-mode vi + +set show-mode-in-prompt on +# Set cursor to line in ins mode and block in cmd mode +$if term=linux + set vi-ins-mode-string \1\e[?0cq\2 + set vi-cmd-mode-string \1\e[?8cq\2 +$else + set vi-ins-mode-string \1\e[6 q\2 + set vi-cmd-mode-string \1\e[2 q\2 +$endif + +# Make history search (with up and down movement) start with current command +$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": vi-movement-mode +$endif + +# Enable faster tab completion by running the double tab in one tab +set show-all-if-ambiguous 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 + +# Disable echoing of ^C after Ctrl+C is pressed +set echo-control-characters off