Stories
Slash Boxes
Comments

SoylentNews is people

posted by chromas on Wednesday August 22 2018, @09:22PM   Printer-friendly
from the :wq dept.

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."


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by jmorris on Thursday August 23 2018, @08:03AM (2 children)

    by jmorris (4844) on Thursday August 23 2018, @08:03AM (#725106)

    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.

    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 3, Insightful) by JoeMerchant on Thursday August 23 2018, @12:21PM

    by JoeMerchant (3937) on Thursday August 23 2018, @12:21PM (#725174)

    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

    by tangomargarine (667) on Thursday August 23 2018, @06:28PM (#725328)

    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.

    C-M-\

    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.

    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?"