1
0
Fork 0

Compare commits

..

No commits in common. "e3b86054df657c8c4f2f7e936d341d04506fb1f9" and "9a9eef922437b8ee13c2c4b2a57422a7c561a481" have entirely different histories.

3 changed files with 19 additions and 25 deletions

19
.bashrc
View File

@ -9,6 +9,25 @@ HISTCONTROL=ignoredups:erasedups
trap "history -n; history -w; history -c; history -r;" EXIT
PROMPT_COMMAND="history -n; history -w; history -c; history -r; $PROMPT_COMMAND"
# readline
set -o vi
bind 'set show-mode-in-prompt on'
bind 'set vi-ins-mode-string \1\e[01;35m\2+\1\e[0m\2'
bind 'set vi-cmd-mode-string :'
bind 'set keyseq-timeout 0'
bind 'set keymap vi-command'
bind 'j:history-search-forward'
bind 'k:history-search-backward'
bind 'set keymap vi-insert'
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
bind 'set show-all-if-ambiguous on'
bind 'set completion-display-width 0'
bind 'set colored-stats on'
bind 'set visible-stats on'
# prompt
PS1="\[\033[01m\]\u@\h:\[\e[01;34m\]\w\[\e[37m\]\$\[\e[00m\] "

View File

@ -1,22 +0,0 @@
$include /etc/inputrc
set editing-mode vi
set show-mode-in-prompt on
set vi-ins-mode-string \1\e[01;35m\2+\1\e[0m\2
set vi-cmd-mode-string \1\e[01;34m\2:\1\e[0m\2
set keyseq-timeout 0
set keymap vi-command
j:history-search-forward
k:history-search-backward
"\e[A":history-search-backward
"\e[B":history-search-forward
set keymap vi-insert
"\e[A":history-search-backward
"\e[B":history-search-forward
control-l:clear-screen
set show-all-if-ambiguous on
set completion-display-width 0
set colored-stats on
set visible-stats on

View File

@ -32,9 +32,6 @@ if [ ! -d "$(dirname "${HISTFILE}")" ]; then
mkdir -p "$(dirname "${HISTFILE}")"
fi
# .inputrc
export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
# editor
export EDITOR=vi