Add inputrc
This commit is contained in:
parent
49f4080f7d
commit
c46221ed15
1 changed files with 47 additions and 0 deletions
47
dotfiles/bash/inputrc
Normal file
47
dotfiles/bash/inputrc
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue