This week I learned 09
After putting it off for too long, I finally started digging into the vim(1)
manuals. Naturally, I’ve already learned a ton. Including a few new tricks that
will antiquate old (, bad) habits.
:g[lobal]/{pattern}/[cmd]: performcmdon lines that matchpattern. This is handy for sorting#includestatements::g/^#include/sort{visual}J: thevim(1)analogue to python’sjoin()method. I used to do this by visually selecting some text, then running:'<,'>s/\n//g. HittingJis much faster.