dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 8f9a6f8d524f9e29eb135e798995e5455973d11d
parent 74c6a973d74bb4f9c767bbbbfb18ab91a50b4a44
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Sun, 24 Dec 2017 20:59:23 -0500

Switch to Vi mode in Readline

Diffstat:
M.inputrc | 31+++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)

diff --git a/.inputrc b/.inputrc @@ -1,14 +1,33 @@ +# Vi keymap +set editing-mode vi +set show-mode-in-prompt on +set vi-cmd-mode-string "[n]" +set vi-ins-mode-string "[i]" +set emacs-mode-string "" + # Single-tab completion set show-all-if-ambiguous on -# Right arrow to cycle through possible completions -Control-Space: menu-complete - -# Up arrow will try to complete from my history -"\e[A": history-search-backward - # Make completion behavior for symlinked directories the same as regular directories set mark-symlinked-directories on # My speakers are almost always muted, so use the visual bell instead set bell-style visible + +$if mode=emacs + # Right arrow to cycle through possible completions + Control-Space: menu-complete + + # Up arrow will try to complete from my history + "\e[A": history-search-backward +$endif + +$if mode=vi + set keymap vi-command + + # k key in vi-command to complete from my history + "k": history-search-backward + + # l key to cycle through possible completions + "L": menu-complete +$endif