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 jmorris on Thursday August 23 2018, @08:03AM (2 children)
You should read the Vim help text about auto indent mode. Just highlight a block of code and let it fix the indenting for you. Better, if you are writing code in it with auto indent it knows the rules for the language and does what needs to be done. Type the closing } and it jumps back to where it is supposed to be, etc.
Or to add a level of indent to a block, position on the first line of the block, do >i{ and yer done. You really need to explore what vim brings to the table.
(Score: 3, Insightful) by JoeMerchant on Thursday August 23 2018, @12:21PM
I've been around long enough to have used several different IDE editors, which have several different auto-indent functionalities (all broken by default, most not fixable), plus different editors with different indentation helping command sequences, again mostly unique in their implementation. There's a big value in training the muscle memory to do things that work everywhere, not just in your special flower environment. I learned this the "hard way" with AutoCad 14 - I programmed it all up with custom command shortcuts to improve my workflow, worked in that environment for 3 months, then went to the production shop to help the real thing get built. I was so completely and utterly lost on anybody else's AutoCad (that obviously lacked my custom command shortcuts) I often had to run back to my laptop just to make a simple edit - maybe more efficient overall, but not great in the shop.
🌻🌻 [google.com]
(Score: 2) by tangomargarine on Thursday August 23 2018, @06:28PM
C-M-\
Yep. Emacs has a plugin for auto-closing parens when you open them too, but I found it got in the way more often than it helped so I turned it off again.
Forcing emacs to automatically indent by the appropriate amount (plus other syntactical sugar plugin stuff) in different languages was a right bastard, though. It's supposed to be a lot easier than the horrible hacks I kludged up to do it but I couldn't figure out how.
"Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"