From ee0abcda84023f50e5b997d462f56856aa5f05ea Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 19 Feb 2018 08:14:36 -0600 Subject: [PATCH] vi-mode: Also configure readline The GNU readline library also has a vi editing mode, but as it is initialized at application start up, the only way to configure it is to write a configuration file. The library will read from `~/.inputrc` by default, but this can be overridden using the `INPUTRC` environment variable. --- vi-mode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vi-mode b/vi-mode index 553cf1f..845d897 100644 --- a/vi-mode +++ b/vi-mode @@ -1 +1 @@ -export EDITOR=vi; set -o vi; [ -x /usr/bin/tmux ] && tmux setw -g mode-keys vi \ No newline at end of file +export EDITOR=vi; set -o vi; [ -x /usr/bin/tmux ] && tmux setw -g mode-keys vi; export INPUTRC=$(mktemp); echo 'set editing-mode vi' > ${INPUTRC}; trap 'rm ${INPUTRC}' EXIT \ No newline at end of file