Today I Learned

hashrocket A Hashrocket project

Exclamation Point Toggles Vim Booleans

I have Vim line numbers turned on as a default, but sometimes I turn them off for better reading.

Today I learned that instead of :set nonumber (and the corresponding :set number) we can toggle any Vim boolean option with an exclamation point.

So, if line numbers are 'on', :set number! (or the even shorter :set nu!) turns them off, and vice versa.

See More #vim TILs
Every developer at Hashrocket is a Vim expert. Check out our development environment, Dotmatrix, and if you are in Chicago, come to the Vim Chicago Meetup hosted at our Chicago office.