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: 5, Informative) by digitalaudiorock on Wednesday August 22 2018, @09:45PM (5 children)

    by digitalaudiorock (688) on Wednesday August 22 2018, @09:45PM (#724881) Journal

    I've used nothing but vi (usually gvim) for a long time. I can't say I'd recommend vi to someone necessarily, but I do find it's great once you start learning even a little of what it's capable of.

    As long as I've been using it I'm sure I've barely scratched the surface, but what I do know seems just too powerful to give up for anything else. Things like being able to do a complex regex replace of everything between two markers...huge stuff. What's more, that stuff all works in a console with no GUI. I also find the syntax highlighting to be better than most. I'm stunned for example as to how many text editors can't handle proper syntax of heredoc quoting. Editors are all about what one you know of course.

    Starting Score:    1  point
    Moderation   +3  
       Insightful=1, Informative=2, Total=3
    Extra 'Informative' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   5  
  • (Score: 2) by JoeMerchant on Wednesday August 22 2018, @11:01PM

    by JoeMerchant (3937) on Wednesday August 22 2018, @11:01PM (#724928)

    do a complex regex replace

    Nifty stuff, for those who speak regex... When I use regex, or sed or similar, it's a Google search for what x expression does "human description", like remove excess white space, or transform new lines to spaces, etc.

    Rather than try to hand manipulate large files with languages like regex, I prefer to generate large files programatically from smaller definitions of what goes in those files... If the pattern needs to change, change the translator code and run it again, and again, and again until it looks right. Then, extending the pattern with new definitions is a reliable operation.

    --
    🌻🌻 [google.com]
  • (Score: 2) by legont on Thursday August 23 2018, @12:35AM (3 children)

    by legont (4179) on Thursday August 23 2018, @12:35AM (#724965)

    Unfortunately vi (and sed) regular expressions are crippled and I can't remember what does not work.

    --
    "Wealth is the relentless enemy of understanding" - John Kenneth Galbraith.
    • (Score: 3, Informative) by jmorris on Thursday August 23 2018, @07:41AM (2 children)

      by jmorris (4844) on Thursday August 23 2018, @07:41AM (#725099)

      Dunno about whatever gimped version of vi you ran into, but gvim on my machine is linked to libpcre2-8.so.0 so the regexes do whatever ya want until yer brain melts trying to understand em.

      • (Score: 2) by digitalaudiorock on Thursday August 23 2018, @01:14PM (1 child)

        by digitalaudiorock (688) on Thursday August 23 2018, @01:14PM (#725190) Journal

        OMG...learn something new every day. I'd actually never even noticed that support nor the :perldo command at all, and I've had the perl USE flag off on my Gentoo vim all this time. Holy crap. Thanks!

        Tom

        • (Score: 2) by digitalaudiorock on Thursday August 23 2018, @01:19PM

          by digitalaudiorock (688) on Thursday August 23 2018, @01:19PM (#725192) Journal

          To clarify, I'd always just used the build in vim regex syntax. One thing I love about that :perldo syntax is that you don't have to constantly remember which regex characters need to be escaped, which is really what makes the built in ones confusing in the first place.

          Tom