autocomplete - how to modify ~/.inputrc for brackets autocompletion in bash vi mode? -
with emacs mode following works:
"(": "\c-v()\e[d"
but if add following @ beginning:
set editing-mode vi
it not work anymore. solutions?
also, can find reference editing inputrc file?
adding following ~/.inputrc solves problem:
set editing-mode vi set keymap vi-insert "\c-b": backward-char "(": "\c-v()\c-b" "[": "\c-v[]\c-b" "{": "\c-v{}\c-b" "\"": "\c-v\"\c-v\"\c-b" "\047": "\c-v\047\c-v\047\c-b"
or in ~/.bashrc:
set -o vi bind -m vi-insert '"(" "\c-v()\ei"' bind -m vi-insert '"[" "\c-v[]\ei"' bind -m vi-insert '"{" "\c-v{}\ei"' bind -m vi-insert '"\"" "\c-v\"\c-v\"\ei"' bind -m vi-insert '"\047" "\c-v\047\c-v\047\ei"'
Comments
Post a Comment