Switching back and forth between tabs and spaces for Python indentation

It seems that majority of python developers prefer using 4 spaces for indentation. However, some people still like using tabs.
I am using python.vim script written by Eric Mc Sween. The file stays in .vim/indent directory.
There is a line saying
setlocal expandtab
This is when you want to use 4 spaces.
If you want to use tabs change it to:
setlocal noexpandtab

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s