bash – using the vi mode more effectively.
2013-11-22
139 words
1 min read

You can first set the bash mode to vi. This will enable some vim like features to bash. So, add this to .bashrc :
set -o vi
Once, you have done that then its time to get more out of the vi mode. First, check some things and set some interesting stuff.
#Display all the bindings : bind -P #Copy the current bindings and use it in inputrc: bind -p |grep -v self-insert>~/.inputrc
In the inputrc, so generated, all the functions and macros not bound are commented with “#” and you can set them to your choice as in other examples.
And here is a link that can get you started.
http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-sheet/
Related articles
Related Articles:
- 2012/05/07 Array of all possible colors in bash script
- 2012/04/30 colors in bash scripts
- 2011/09/27 some interesting alias
- 2011/09/16 better bash debugging
- 2011/08/09 bash completion

Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.