3 ms·
Yes! I never got the hang of the read line short cuts. Only one I remember and regularly use is reverse history search: ctrl-R. The downside is that while vim
by bippingchip 4y ago
Yes! I never got the hang of the read line short cuts. Only one I remember and regularly use is reverse history search: ctrl-R.
The downside is that while vim mode works nicely on bash, other commands like gdb etc that also use read line aren’t as easy to get into vim mode, if they support it at all…
- gen220 4y agoime, most programs using readline parse ~/.inputrc. set editing-mode vi set keymap vi-command That does the trick for me in python shell, psql, etc. First thing I do on any fresh unix box is setting above, and echo "set -o vi" >> ~/.bash_profile.
- tristan957 4y agoFor programs which use libedit, you can also setup vi mode. bind -v
- gen220 4y agoGood one! That covers sqlite3, it was my last straggler. :)
- cassepipe 4y agoCan't remember why but I am pretty the second line is not needed
- cassepipe 4y agogdb also uses readline... And readline is configured with ~/.inputrc Here is my config from a happy gdb vim mode user : set editing-mode vi # If set to ‘on’, Readline performs filename matching and completion in a case-insensitive fashion. The default value is ‘off’. set completion-ignore-case on # If set to ‘on’, Readline displays possible completions using different colors to indicate their file type. The color definitions are taken from the set colored-stats on # Perform partial (common) completion on the first Tab press, only start # cycling full results on the second Tab press (from bash version 5) set menu-complete-display-prefix on ### MAPPINGS ### # Allow to refresh the screen "\C-l":clear-screen # If there are multiple matches for completion, Tab should cycle through them TAB:menu-complete