vim configuration for python

Gary Johnson garyjohn at spk.agilent.com
Thu May 26 02:33:28 EDT 2005


In comp.editors Leonard J. Reder <reder at jpl.nasa.gov> wrote:
> Hello,
> 
> I am looking at configuring vim for Python.  Most importantly I
> need 4 spaces when the tab is hit.  I am searching and getting
> a bit confused.  Does anyone know where I can find a set of
> ready made .vimrc and ~/.vim/syntax/python.vim.  If could find
> c.vim and cpp.vim these would be useful also.

The vim distribution already contains python.vim files for syntax, 
indenting and general configuration.  It also contains a similar set 
of c.vim and cpp.vim files.  These should all be in the appropriate 
subdirectories under $VIMRUNTIME.  You might take a look at

    :help ftplugins
    :help filetype-indent-on
    :help filetype-overview
    :help usr_43.txt
    :help usr_06.txt

If the files supplied with vim for Python don't do what you want, 
you might also search the scripts and tips at vim.sf.net for 
"python".

HTH,
Gary



More information about the Python-list mailing list