vi setup for pyton

Gerhard Häring gerhard.nospam at bigfoot.de
Mon May 28 17:25:35 EDT 2001


On Mon, 28 May 2001 21:57:58 +0000, Matthew Hirsch <meh9 at cornell.edu> wrote:
>Hi,
>
>I'm trying to setup vi for python.  How do I setup vi so that a tab will
>be four spaces?

I'll just cut and paste my .vimrc that I have customized for Python and Java
editing. You just asked for "set ts=4 sw=4", but the rest may be useful, too:

Gerhard


" VIM configuration file from Gerhard Häring (gerhard<at>bigfoot<dot>de)
" Under Unix, save as .vimrc in home directory, under Windows, save
" as _vimrc in your %VIM% directory.

source $VIMRUNTIME/vimrc_example.vim

set nocompatible
set autoindent
set expandtab
set showmatch
set hidden
set ts=4 sw=4
set cindent
set incsearch
set ignorecase
set smartcase

:autocmd BufNewfile,BufRead *.java set cindent formatoptions=tcqlro
:autocmd BufNewfile,BufRead *.py set smartindent
:autocmd BufNewfile,BufRead *akefile* set noexpandtab
:autocmd BufNewfile,BufRead *.mak set noexpandtab

map <F3> :nohl<CR>

behave xterm

-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://highqualdev.com              public key at homepage
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))



More information about the Python-list mailing list