Thanks to the wiki for this. If you run across a file that mixes tabs and spaces (ewww!), set the tab settings the way you want (e.g., ts=4 sts=4 sw=4 et ai) and run
to convert all the tabs to the right number of spaces. This takes tab stops into account, which :%s/^I/ /g won’t.
This replaces what I used to do, which was /^I s<Tab><Esc> followed by a whole lot of n.n.n.n.n.n.n.n. … . One command is much better 🙂 . I’m not even going to try to count the keystroke savings on my current project (pym, a preprocessor written in Python).
This handy file-renaming script at Perl Monks has source code with red “+” marks marking wrapped lines. I pasted it into Vim and wanted to wrap those lines back to the way they should be. After a bit of fiddling, I got:
:g/^+/execute "norm 0x" | .-1,.j!
The `g/^+/’ finds the lines beginning with a “+”. Then the `execute “norm 0x”‘ deletes the “+” (“0” moves to beginning of line; “x” deletes), “|” marks the next command, and `.-1,.j!’ joins (“j”) the current line (“.”) with the previous line (“.-1”) without whitespace (“!”) added between the lines.
I leave it to you whether I have too much time on my hands.
This got lost in my drafts folder. Enjoy! (I did!)
Editor Wars: The Revenge of Vim – http://hackaday.com/2016/08/08/editor-wars-the-revenge-of-vim/
“Daybreak,” another forgotten prog gem, by Dutch band Mirror. Listen all the way to the end; the last five minutes are definitely worth it.
“Unsealed” by CarboHydroM. A massive orchestral/rock/instrumental reworking of the Zelda 3 soundtrack. I just listened to it twice in a row!
Just discovered this prog rock album from 1977 by a band called “Hands”. Never heard of the band before, but they’ve got a pretty nice sound!