Correcting VIM indention, Python

First off, get your VIM editor up to speed.

http://henry.precheur.org/2008/4/18/Indenting_Python_with_VIM.html

Check that your filetype and settings are correct...


:filetype

filetype detection:ON plugin:ON indent:ON 1,0-1 Top


Now issue the magic VIM command to re-tab the entire file.


gg=G


Or here's an alternative that converts all tabs to spaces


:set tabstop=4
:set shiftwidth=4
:set expandtab
:retab

Comments

Popular Posts