Are these two vi-related `.inputrc` lines redundant?

I have seen people recommend putting both of the following lines in one .inputrc to enable vi mappings of vi:

 set editing-mode vi set keymap vi 

Sometimes recommended separately ; sometimes recommended. G! Both are needed on any systems?


As a greedy side, if any of them are included in one .inputrc , you still need to include:

 set -o vi 

... in one .bash_profile ?

+6
source share
2 answers

Only the first line is required:

 set editing-mode vi 

The second line determines how future keyboard shortcuts will be applied manually:

 set keymap vi 
+3
source

The /etc/inputrc or ~/.inputrc manages the readline library. Readline is used by many programs (including bash).

Second, set -o vi only controls bash. vimrc does not affect bash.

+4
source

Source: https://habr.com/ru/post/895835/


All Articles