Get Setting / Option Value in Vim
Today I was trying to figure out whether or not I had the smartindent setting on in Vim, and could not remember the easiest way to check this. It took me a surprisingly/annoyingly long amount of time to figure out how to do this on Google.
To view the value of a setting, like smartindent, simply do:
:echo &smartindent
1
Now toggle, and you see the change:
:set nosmartindent
:echo &smartindent
0