I have set tabstop and shiftwidth to 2 in my vimrc, but still when I go to a new line vim uses 4-space indents. I also get this warning if I save a file that uses 2 spaces for indentation:
E111 indentation is not a multiple of four [pep8]
How can I make vim use 2 spaces for Python? It seems to be ignoring my vimrc for Python.
I am using vim 7.2.
autocmd Filetype python setlocal ts=2 sw=2 expandtab