Computer >> Computer tutorials >  >> Programming >> Python

How to setup VIM autoindentation properly for editing Python files?


To set autoindent for python files in VIM, use the following config:

Example

set ts=4
set sts=4
set sw=4
set autoindent
set smartindent
set smarttab
set expandtab

Add this config to your .vimrc file in home folder.