From: Cian Bagshaw Date: Wed, 25 Sep 2024 22:27:23 +0000 (+0100) Subject: Added inputrc/readline config X-Git-Url: https://tests.cianb.xyz/?a=commitdiff_plain;h=HEAD;p=dotFiles Added inputrc/readline config Buffered line input using GNU Readline is now configured globally. Also, fixed Python Shell Readline history, so it is available for the current session, though still not saved after that. --- diff --git a/.bashrc b/.bashrc index c68d549..318535f 100644 --- a/.bashrc +++ b/.bashrc @@ -21,9 +21,6 @@ man() { command man "$@" } -# vim mode -set -o vi - # disable history unset HISTFILE diff --git a/.config/python b/.config/python index e026454..94a4e40 100644 --- a/.config/python +++ b/.config/python @@ -3,4 +3,4 @@ # disable history import readline -readline.set_auto_history(False) +readline.write_history_file = lambda *args: None diff --git a/.config/readline b/.config/readline new file mode 100644 index 0000000..39a869f --- /dev/null +++ b/.config/readline @@ -0,0 +1,29 @@ +# vim: filetype=readline + +$include /etc/inputrc + +set editing-mode vi +set keyseq-timeout 250 + +set colored-stats +set colored-completion-prefix + +set completion-ignore-case +set completion-map-case +set mark-symlinked-directories +set show-all-if-ambiguous +set blink-matching-paren +set skip-completed-text +set revert-all-at-newline + +"jj": "\e" + +Control-l: clear-screen +Control-w: clear-screen line +Control-a: beginning-of-line +Control-e: end-of-line + +Control-k: history-search-backward +Control-j: history-search-forward +Control-n: menu-complete +Control-b: menu-complete-backward diff --git a/.profile b/.profile index 1b88f11..7bdfe10 100644 --- a/.profile +++ b/.profile @@ -22,6 +22,7 @@ export XDG_STATE_HOME="$HOME/.local/state" export XDG_RUNTIME_DIR="/run/user/$UID" # config file locations +export INPUTRC="$XDG_CONFIG_HOME/readline" export VIMINIT="source $XDG_CONFIG_HOME/vim" export XINITRC="$XDG_CONFIG_HOME/x11" export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch"