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.
1 line
172 B
Plaintext
1 line
172 B
Plaintext
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 |