http://samrowe.com/wordpress/advancing-in-the-bash-shell/ is a good list of extra tips
Shortcuts to Move Faster in Bash Command Line
21–26 of 26 posts
Re: Shortcuts to Move Faster in Bash Command Line
#22Earlier quoted context omitted.
Beat me to it. (My first thought upon seeing the headline was, "wow, faster than vi mode?") I haven't actually put the set into my .bashrc yet, I just end up typing it when I realize I'm about to navigate a lot.
Semi-related, but what's the fastest vi way to get to the space right after the first word? For example, I might type > ls /etc/foo/bar and have my cursor at the end when I realize I want to type ls -l instead. I know there's got to be a faster way than what I'm currently doing, but I'm blanking. (Yes, I know sometimes tacking on the command line switch at the end will work, but that's not true for all commands).
You can hit `;` if there are multiple incidences of 's'.
Re: Shortcuts to Move Faster in Bash Command Line
#23Earlier quoted context omitted.
Beat me to it. (My first thought upon seeing the headline was, "wow, faster than vi mode?") I haven't actually put the set into my .bashrc yet, I just end up typing it when I realize I'm about to navigate a lot.
Semi-related, but what's the fastest vi way to get to the space right after the first word? For example, I might type > ls /etc/foo/bar and have my cursor at the end when I realize I want to type ls -l instead. I know there's got to be a faster way than what I'm currently doing, but I'm blanking. (Yes, I know sometimes tacking on the command line switch at the end will work, but that's not true for all commands).
that should work for commands without spaces in them.
I remap jj to escape so it is faster than moving my hand.
in ~/.inputrc
set editing-mode vi
$if mode=vi
#normal mode
set keymap vi-insert
"jj": vi-movement-mode
$endifRe: Shortcuts to Move Faster in Bash Command Line
#24One of my most life-changing bash configurations is having history-search-backward / history-search-forward bound to the up and down arrows. Put the following in your ~/.inputrc "\e[A": history-search-backward "\e[B": history-search-forward "\e[C": forward-char "\e[D": backward-char set show-all-if-ambiguous on set completion-ignore-case on Now if you type, say: cat You will cycle through commands in your history tha…
Re: Shortcuts to Move Faster in Bash Command Line
#25Re: Shortcuts to Move Faster in Bash Command Line
#26Also install the awesome autojump: https://github.com/joelthelion/autojump If I was previously sitting in directory: ' /home/user/code/github.com/cookbooks/cassandra/recipes ' and I wanted to jump back to that dir from anywhere on the file system I could just type ' j cass rec ' and it would autocomplete and jump to this location. Super helpful.