Created
May 1, 2021 22:13
-
-
Save marcopaganini/5a3cdedc687cc7679027d89bc608cf2d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Useful configuration for your ~/.inputrc. | |
# Just drop this file into your home directory. | |
# Author: paganini@paganini.net (http://github.com/marcopaganini) | |
# vi mode FTW. Use <ESC> to enter. | |
set editing-mode vi | |
# Show mode in prompt when in command mode. | |
set show-mode-in-prompt on | |
set vi-ins-mode-string "" | |
set vi-cmd-mode-string \1\e[31;1m\2*\1\e[0m\2 | |
# Remap the keypad to do the right thing. | |
"\e[1~": beginning-of-line | |
"\e[4~": end-of-line | |
"\e[5~": beginning-of-history | |
"\e[6~": end-of-history | |
"\e[3~": delete-char | |
"\e[2~": quoted-insert | |
# Ctrl-Arrows move forward and backwards by one word. | |
"\e[5C": forward-word | |
"\e[O5C": forward-word | |
"\e[1;5C": forward-word | |
"\eOc": forward-word | |
"\eOC": forward-word | |
"\e[5D": backward-word | |
"\e[O5D": backward-word | |
"\e[1;5D": backward-word | |
"\eOd": backward-word | |
"\eOD": backward-word | |
# Ctrl Backspace == Erase last word | |
"\C-h": backward-kill-word | |
# Up and down arrows will search the history using the partially typed command. | |
# E.g; Typing fi<up arrow> will locate the last "find" command. Using up-arrow | |
# continuously will cycle through all commands starting with "fi". | |
"\e[B": history-search-forward | |
"\e[A": history-search-backward | |
# Miscelaneous useful options. Use man bash to find out more about these. | |
set show-all-if-ambiguous on | |
set completion-ignore-case On | |
set bell-style none | |
set colored-completion-prefix on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment