Disabling expandtab in Vim

In my .vimrc file I set expandtab, which means tab characters are converted to spaces.

Today I had to edit a python file, and I know python is funny about tabs and spaces, so I wanted to temporarily disable the expandtab feature in Vim.

Turns out you can do it with:

:set expandtab!

Leave a Reply