TLDR Web Dev · ARTICLES & TUTORIALS

BAD APPLE BUT IT'S 6,500 REGEXES THAT I SEARCH FOR IN VIM

eieio.games14 min read

Summary from the TLDR Web Dev newsletter

The author re-created a Bad Apple music video within Vim using only search queries. The process involved converting the video frames into binary data, representing each pixel as a character in a Vim-compatible grid using a square font. They then developed algorithms to decompose each frame into a minimal set of rectangles, which are expressed as complex Vim search patterns. Finally, a Vim macro iterates through these patterns.