[sf-lug] My favorite simple little Linux tips

Michael Shiloh michaelshiloh1010 at gmail.com
Fri Jul 30 19:14:26 PDT 2010

> The advantage of '^string1^string2' is that string1 does not have to be
> at the start of the command, so you can make spelling corrections
> to errors in the middle of a long command this way

I've been using Unix for about 30 years, and I've found I'm really quick 
at figuring out which of the many alternative ways to do something 
requires the minimum number of keystrokes.

For instance, to replace something near the end of a line requires up 
arrow and then as many backspaces as necessary to get to the error. On 
the other hand, fixing something near the beginning of a line with the 
^^ shortcut takes less. In the middle, perhaps adding a couple of 
surrounding characters will be enough to make it unique but still 
shorter than backspaces.

The weird thing is that it's almost muscle memory. I find I don't even 
consciously think of it. My fingers just do the shortcut.

I'm even faster, and less conscious, in vi, where there are perhaps a 
dozen different ways to accomplish every task. I love vi, but I know I'm 
using perhaps 20-30% of the total capabilities. I'd love to hear of your 
interesting and perhaps less familiar (but useful) vi tricks.

Speaking of vi, I love vimperator!

> And while I'm at it, I should point out that when editing a long command
> from your command history, Control-A is the default keybinding for
> moving the cursor to the start of the line, and Control-E moves you to
> the end.
> The other shortcut I like is when you prepend an '!' to a command
> to re-run the same command once again:
>    vim some-really-long-filename
>    [many more commands, which do not use vim]
>    !vim     ==>  evails to 'vim some-really-long-filename'
> Regards,
> Mike
> _______________________________________________
> sf-lug mailing list
> sf-lug at linuxmafia.com
> http://linuxmafia.com/mailman/listinfo/sf-lug
> Information about SF-LUG is at http://www.sf-lug.org/

Sent from my ASR-33

More information about the sf-lug mailing list