From 0ee4158545b01d871422e6e05403e2d317323e46 Mon Sep 17 00:00:00 2001 From: urosm Date: Sat, 12 Aug 2023 01:29:27 +0200 Subject: [PATCH] add `readline` config --- .config/readline/inputrc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .config/readline/inputrc diff --git a/.config/readline/inputrc b/.config/readline/inputrc new file mode 100644 index 0000000..cf89be6 --- /dev/null +++ b/.config/readline/inputrc @@ -0,0 +1,28 @@ +$include /etc/inputrc + +# vi mode +set editing-mode vi +set show-mode-in-prompt on +set vi-ins-mode-string "\1\e[01;31m\2+\1\e[0m\2" +set vi-cmd-mode-string "\1\e[01m\2:\1\e[0m\2" + +set keyseq-timeout 50 + +# history search +$if mode=vi + set keymap vi-command + "j": history-search-forward + "k": history-search-backward + set keymap vi-insert + "\e[A": history-search-backward + "\e[B": history-search-forward +$endif + +# faster completion +"\t":menu-complete +"\e[Z":menu-complete-backward +set show-all-if-ambiguous on + +# color +set colored-stats on +set visible-stats on