# Include system wide settings which are ignored # by default if one has their own .inputrc $include /etc/inputrc # do not make noise. Also visible can cause delays. set bell-style none # Don't echo ^C etc (new in bash 4.1) # Note this only works for the command line itself, # not if already running a command. set echo-control-characters off # Enable coloring for tab completions with bash >= 4.3 set colored-stats on # Note this must be done before the settings below set editing-mode vi $if mode=vi # Need to explicitly remap some things in vi mode # so that they remain consistent for all modes # Workaround bash 4.4 bug to support Ctrl-w within a line # https://bugs.debian.org/838437 $if Bash set bind-tty-special-chars Off set keymap vi-insert "\C-w": unix-word-rubout set keymap vi-command "\C-w": unix-word-rubout $endif set keymap vi-command # Ctrl-{left,right} jump over words Control-l: clear-screen $if Bash "\e[1;5C": shell-forward-word "\e[1;5D": shell-backward-word "\e[5C": shell-forward-word "\e[5D": shell-backward-word $else "\e[1;5C": forward-word "\e[1;5D": backward-word "\e[5C": forward-word "\e[5D": backward-word $endif # See description below "\e[B": history-search-forward "\e[A": history-search-backward # Ctrl-k: delete to EOL "\C-k": kill-line set keymap vi-insert Control-l: clear-screen # Ctrl-{left,right} jump over words $if Bash "\e[1;5C": shell-forward-word "\e[1;5D": shell-backward-word "\e[5C": shell-forward-word "\e[5D": shell-backward-word $else "\e[1;5C": forward-word "\e[1;5D": backward-word "\e[5C": forward-word "\e[5D": backward-word $endif # See description below "\e[B": history-search-forward "\e[A": history-search-backward # Ctrl-k: delete to EOL "\C-k": kill-line $endif $if Bash # F10 toggles mc on and off # Note Ctrl-o toggles panes on and off in mc "\e[21~": "mc\C-M" # do history expansion when space entered Space: magic-space # By defult Ctrl-{left,right} jump over words, # instead jump as shell tokenizes the line "\e[1;5C": shell-forward-word "\e[1;5D": shell-backward-word $endif # By default up/down are bound to previous-history # and next-history respectively. The following does the # same but gives the extra functionality where if you # type any text (or more accurately, if there is any text # between the start of the line and the cursor), # the subset of the history starting with that text # is searched (like 4dos for e.g.). # Note to get rid of a line just Ctrl-C. # Note with this mapped in vi insert mode, # bash <= 4.3 would move to command mode at end of search items "\e[B": history-search-forward "\e[A": history-search-backward