4 ms·
I use these settings in my .inputrc. The get me a few more commands and even the ability to escape using jj. set completion-ignore-case On set bell-sty
by bilalq 13y ago
I use these settings in my .inputrc. The get me a few more commands and even the ability to escape using jj.
set completion-ignore-case On
set bell-style none
set editing-mode vi
$if mode=vi
set keymap vi-command
"gg": beginning-of-history
"G": end-of-history
set keymap vi-insert
"jj": vi-movement-mode
"\C-p": history-search-backward
- b-ryan 13y agoThanks for this. I switched my input mode to VI and was greatly missing using Ctrl-L to clear the screen when in input mode. I hadn't known about the inputrc before. Adding this line below your "\C-p" line fixed that for me: "\C-l": clear-screen
- bilalq 13y agoOh wow, I didn't even think about that. I've been making do with Cmd+K on OSX and aliasing c to clear to get around the problem.
- tambourine_man 13y agoCommand-K also does the trick
- bilalq 13y agoCommand-K won't play nicely with tmux panes though.
- yawboakye 13y agoSigns you have to revert to Emacs mode. Unless it's an assemblage, it's always a smell if you replace a unit of a body with that of a "competitor."
- awolf 13y ago>set completion-ignore-case On Thanks. Keeping track of whether certain directories were capitalized or not has been unnecessarily occupying my mental bandwidth for years.
- mkdir 13y agoIs there a functional difference between putting... set editing-mode vi ... in one's inputrc and... set -o vi ... in one's .bashrc? I realize that .inputrc is the config file for Readline, and .bashrc is essentially a start-up file for Bash. But is it ever necessary to use both snippets?
- terminus 13y agoI would imagine that .inputrc would serve as a superset in that all programs (for instance gdb) whiich use readline would now default to vi mode.
- troyk 13y agoVery cool, does anyone know a way to set a visual indicator (diff cursor?) when in edit mode?
- yawboakye 13y ago> set completion-ignore-case works well with "\t": menu-complete But I had to delete this entry. I need the case to differentiate between which path I really wanted :(
- joshweinstein 13y agoI've been wanting to use 'jj' to enter normal mode on the command line for some time. This solution actually didn't work for me, but adding the following to my .zshrc did: bindkey -M viins 'jj' vi-cmd-mode
- bilalq 13y agoThat is because zsh does not make use of readline. I ran into this issue myself recently, since I use bash on my personal machines and zsh on my work ones.
- danielrm26 13y agoSuper off-topic, but I bet you'd be far happier if you used only one.