Vim Unset or Toggle a Boolean Option

There are a bunch of ways to toggle a boolean option in Vim. An example of a boolean option is number that shows line numbers when set or expandtab that inserts spaces instead of the tab character (\t). Setting them is simple: How can we unset or toggle them quickly? Well if you just want […]

Vim Check Current Value of an Option Setting

We can ask Vim to show or display the current value of an option by appending a ? with :set {option}. The official syntax is :se[t] {option}?. For the second version shown above, this is what the output will look like: expandtab is a boolean option which is off (noexpandtab). tabstop is an option that […]

Vim Set Tab to N Spaces

Want to convert the tab key to insert 2, 4 or 8 spaces instead of the tab character (\t) in Vim? Let’s look at the settings we need to configure in order to achieve this: :set expandtab – Uses the appropriate number of spaces to insert instead of the tab character (\t) when the tab […]