Reputation
5,670
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
11 49 98
Impact
~720k people reached

Aug
26
comment Can I use Vim editing mode on the command line without losing recursive history search?
My muscle memory blesses you!
Aug
26
comment Can I use Vim editing mode on the command line without losing recursive history search?
Yes, zshell is the same. Thanks!
Jul
1
comment How can I simulate a slow machine in a VM?
Ha! Interesting idea to buy an actual machine. Since the whole idea is to emulate an old computer, buying an old computer is a pretty cheap option. :)
Jun
24
comment In bash, how can I rename a file without repeating the path?
Cool! I think Darth's brace expansion method is easier, but this is exactly what I asked for.
Jun
16
comment In bash, how can I rename a file without repeating the path?
Oh, right! I love brace expansion but I didn't think to use it here. :) Thanks!
Apr
5
comment Despite the fact that GIT does NOT store file deltas, can you still rollback to previous file versions (unlimited times?)
Chris, you seem to have a pretty good handle on Git internals. Any chance you might take a swing at this? stackoverflow.com/questions/5176225/…
Apr
5
comment Despite the fact that GIT does NOT store file deltas, can you still rollback to previous file versions (unlimited times?)
Also, because Git uses snapshots of files rather than deltas, going back a long way in history is actually easier. Imagine you need to see a file from 20 commits ago. With deltas, you need to undo 20 changesets; with snapshots, you just grab the right snapshot. The longer your history, the bigger the advantage. And if you want to see the diff between the current version and that one, it's just a single diff, rather than having to decide what's been done, undone, redone, etc.
Mar
22
comment How can I make chown work recursively?
Thanks for the thorough explanation!
Mar
2
comment In Vim, what is Control + W for in insert mode?
Yep! This was in my .vimrc, which I intially got from a friend and have been tweaking since: imap <C-w><C-w> <esc><C-w><C-w> So he specifically mapped hitting "control + w" twice in insert mode to moving to the next window.
Mar
2
comment In Vim, what is Control + W for in insert mode?
@Mikel - updated question.
Mar
2
comment How can I use my local copy of Vim on a server?
Pulling the latest with cron is a neat idea. I guess each user on the server could have their own .vimrc synced to their home directory...
Mar
2
comment Is there an easier-to-reach mapping for ESC in Vim?
Interesting. What are the cases where CTRL-C is different?
Mar
2
comment Is there an easier-to-reach mapping for ESC in Vim?
I know that Control + [ does the same thing, but that's not really easier for me.
Mar
2
comment How can I batch rename files in bash?
This isn't the most concise way, but I do appreciate the readability and explanation. If I'm going to do this from the command line, I'd rather type what chrish shows, but if I were saving it as a script, I'd definitely use your way for readability.
Mar
2
comment How can I batch rename files in bash?
Nice - the most concise way so far.
Mar
2
comment How do I change until the next underscore in VIm?
It's great to know that I can define my own word boundaries, but after some thought, I think the best solution is ct_ as doubleface says below, since it's concise and is default vim behavior.
Mar
2
comment How do I change until the next underscore in VIm?
ct_ is exactly what I wanted. This has now become part of my regular workflow. Thanks!
Mar
2
comment In Vim, what's an elegant way to grab output from the command-line?
I also didn't know you could manually set registers like let @a = 'foo'. One cool idea would be, after doing a search and replace, you could save the search term to a register for pasting elsewhere by doing let @a = @/ - "make the a register contain what the / register contains, namely, my last search."
Mar
2
comment In Vim, what's an elegant way to grab output from the command-line?
Also - I didn't know about the system call. That's awesome!
Mar
2
comment In Vim, what's an elegant way to grab output from the command-line?
After looking at the help and experimenting, I see that 1) :r is short for "read" (so you can type out 'read' or just 'r' and it's the same command), and 2) doing :r path/to/foo.txt will insert the contents of that file after the cursor.