alex kuang

professional yak shaver

Vim Visual Block Mode

Friday Dev Demos are a big part of Bizo culture. Every Friday, developers take turn presenting a short 10-15 min demo on something cool they’d found that wasn’t necessarily work related. The topic could be anything from a neat snippet of code to a cool iOS application they’d just found to a fun web game. Dev demo day is great for the social aspect, but also for the chance to showcase (and draw inspiration from) ideas that might not come up in day-to-day discussion.

Unfortunately, the practice kind of fell by the wayside in the chaos of joining a new company and all the changes that entails. While I’m sure it–or something similar–will make a comeback, in the meantime I decided to try carrying on the torch by starting a weekly “Thing of the Week” email blast that is in roughly the same spirit. And I figured while I’m at it, why not stick it on the blog? If nothing else, it will mean more practice writing and more incentive for me to be proactive in learning new things to talk about.

So without further ado, the first “Thing of the Week” is a neat little feature in vim that I don’t think deserves enough attention–Visual Block mode. The visual modes in vim are very similar to highlighting in other editors, but I’ve always felt that Visual Block is the underrated cousin to Visual and Visual Line mode. Rather than trying to explain what it does in words, here’s a quick terminal cast to demonstrate via asciinema: