I use a mac, which is built on unix, and here is my .vimrc:
set nocompatible "cannot remember, but necessary for something
syntax on "syntax highlighting
filetype plugin indent on
au FileType htm setlocal expandtab shiftwidth=2 softtabstop=2
au FileType html setlocal expandtab shiftwidth=2 softtabstop=2
au FileType css setlocal expandtab shiftwidth=2 softtabstop=2
au FileType javascript setlocal expandtab shiftwidth=2 softtabstop=2
au FileType xml setlocal expandtab shiftwidth=2 softtabstop=2
au FileType ruby setlocal expandtab shiftwidth=2 softtabstop=2
au BufNewFile,BufRead *.ru set filetype=ruby
au BufNewFile,BufRead *.slim set filetype=ruby
au FileType cgi setlocal expandtab shiftwidth=2 softtabstop=2
au FileType python setlocal expandtab shiftwidth=4 softtabstop=4
au FileType perl setlocal expandtab shiftwidth=4 softtabstop=4
au FileType php setlocal expandtab shiftwidth=4 softtabstop=4
au FileType java setlocal expandtab shiftwidth=4 softtabstop=4
au FileType cpp setlocal expandtab shiftwidth=4 softtabstop=4
au BufNewFile,BufRead *.coffee set filetype=ruby
au BufNewFile,BufRead *.jsp set filetype=html
set textwidth=78
The python relevant stuff boils down to this:
set nocompatible "cannot remember, but necessary for something
syntax on "syntax highlighting
filetype plugin indent on
au FileType python setlocal expandtab shiftwidth=4 softtabstop=4
set textwidth=78
I will get compile errors and I will have to go to an editor like
emacs to check where the error actually is.
What's going wrong?