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.