Over at The New Stack is a brief but entertaining history of the editor vi and Vim.
"The editor was optimized so that you could edit and feel productive when it was painting slower than you could think. Now that computers are so much faster than you can think, nobody understands this anymore," Joy said. "It was a world that is now extinct. People don't know that vi was written for a world that doesn't exist anymore."
(Score: 2) by tangomargarine on Thursday August 23 2018, @06:20PM (3 children)
C-u -4 C-x TAB
The "C-u -4" is just telling it to perform the "indent by 1 space" operation negative four times, though.
Yeah, for some reason the emacs default for inserting registers leaves the cursor at the beginning of it, too. Had to figure out how to change that setting.
"Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"
(Score: 2) by JoeMerchant on Thursday August 23 2018, @07:55PM (2 children)
So, even if I could remember and easily execute C-u -4 C-x TAB, why would I want to?
Cursor to one corner
Alt-A
Cursor to other corner (visual editing, horrors, but at least it's a character interface)
Alt-B
Ctrl-X
Not only is it faster and simpler to execute, it's also something approaching intuitive.
🌻🌻 [google.com]
(Score: 2) by tangomargarine on Thursday August 23 2018, @08:16PM (1 child)
My point is just that this is something you can do with various editors. Which is better is subjective.
Or if we want to literally do it your way using emacs rectangle mode, Ctrl+SPACE at beginning, arrow to select,* C-x r k, which is an exactly equal number of keys.
C-x is the standard keychord before any sort of default macro, (R)ectangle (K)ill.
*you don't have to do anything to denote the end of the selection
Ha. Yeah, because anything involving rectangular selections is ever intuitive, sure.
YMMV
"Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"
(Score: 2) by JoeMerchant on Friday August 24 2018, @02:13AM
I think if more editors had good rectangle selection implementations, that coding style conventions would be different than they are, more matrix oriented. It doesn't happen all the time, but many times I do find situations where organizing code into a 2D array on the editing screen both makes it more readable, and much more easily edited with rectangle selection manipulations.
🌻🌻 [google.com]