PSU uses emacs?

Roland Schlenker rol9999 at attglobal.net
Wed Jan 24 09:41:54 EST 2001


Ray Drew wrote:
> I'm having problems getting the indentation right with gvim. I've got
> the following in my .vmrc file:
> 
> au FileType py set ts=4
> au FileType py set sw=4
> au FileType py set expandtab on
> au FileType py set ff=unix
> 
> as far as I can make out from the docs, this should set those options
> for all .py files. Tabs appear as 4 chars in gvim but when viewed in
> an IDLE edtor window, tabs appear as 8 and throw a syntax error when
> imported (files originally created in IDLE with tab space of 4). Do I
> need to do anything else to get this to work?
> 
> Ray Drew
> CIA UK

The following works for me;

set filetype

au FileType python set ts=4
au FileType python set sw=4
au FileType python set expandtab
au FileType python set ff=unix

'py' should be 'python', see /usr/share/vim/vim56/filetype.vim to 
see how how the command 'filetype' is processed, and 'expandtab' 
does not need the following 'on'.

Roland Schlenker



More information about the Python-list mailing list