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