HOWTO Enter Spaces instead of Tabs in VI & VIM

July 9, 2013

Spaces vs. Tabs are generally annoying when editing files, but start programing in Python and this turns into a complete disaster. Simple solution, always insert Spaces instead of a Tab and you are good to go (my personal preference):

set tabstop=4set shiftwidth=4set expandtab

If you want to be really fancy:

:retab

Will convert all of the existing Tabs into Spaces.

Check out Converting tabs to spaces on the VIM Wiki.

The Next Move Is Yours

Stop Guessing. Start Leading.

Make your next IT decision the right one.