by mr_o47 · 3y ago · 0 comments
I'm the author of this post, and I hope you enjoyed reading it.
I wanted to share this one-liner for fun: :%s/\w\+/\=submatch(0)+1/g | echo line('$')
Although I know there are more efficient ways to count words in a file using Vim, I wanted to be a little creative.
Lastly, I want to express my deep sadness over the passing of Bram Moolenaar. He created an extraordinary text editor that had a profound impact.
Rest in Peace Bram Moolenaar
RIP Bram.
Here’s the problem I have: I don’t often have to format unformatted JSON, but when I do, it’s almost always an error message I’m trying to parse in order to track down a bug. So I tell myself “I should really figure out how to automate this…I know it’s obviously possible, but I just really wanna fix this bug right now, so I’ll do that later.”
And then the next time it happens, I curse myself for not having researched that, and promise to do it before the next time.
So I’m just happy that I stumbled across this page. Now I don’t have to remember to research it :)