From 30cdc06bcdfc2dce350f56b166e51fa747944559 Mon Sep 17 00:00:00 2001 From: Patrick Donelan Date: Mon, 23 Jun 2014 17:14:16 +0200 Subject: [PATCH] Add vi-command keymap mappings fzf does not currently define vi-command mode mappings. This is particularly annoying for , which opens bash's old-fashioned recursive history search. This patch adds vi-command mode mappings that simply drop back into vi-insert mode ("i") and then trigger the primary mapping. --- install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install b/install index 47bba47..46362ab 100755 --- a/install +++ b/install @@ -155,12 +155,15 @@ else else bind '"\C-t": "\e$a \eddi$(__fsel)\C-x\C-e\e0Px$a \C-x\C-r\exa "' fi + bind -m vi-command '"\C-t": "i\C-t"' # CTRL-R - Paste the selected command from history into the command line bind '"\C-r": "\eddi$(HISTTIMEFORMAT= history | fzf +s +m -n..,1,2.. | sed \"s/ *[0-9]* *//\")\C-x\C-e\e$a\C-x\C-r"' + bind -m vi-command '"\C-r": "i\C-r"' # ALT-C - cd into the selected directory bind '"\ec": "\eddi$(__fcd)\C-x\C-e\C-x\C-r\C-m"' + bind -m vi-command '"\ec": "i\ec"' fi unset __use_tmux