Re: python auto indentation problem of indent/python.vim

2009-10-01 Thread Peng Yu
On Sep 30, 9:39 pm, sc wrote: > On Wednesday 30 September 2009, Peng Yu wrote: > > > > > If I have > > > def fun(x,y): > > if x > y: > >   print x > > > else > >   print y > > > After vim indentation, I have > > > def fun(x,y): > >   if x > y: > >     print x > > >   else > >   print y > > i do

Re: python auto indentation problem of indent/python.vim

2009-09-30 Thread sc
On Wednesday 30 September 2009, Peng Yu wrote: > If I have > > def fun(x,y): > if x > y: >   print x > > else >   print y > > > After vim indentation, I have > > def fun(x,y): >   if x > y: >     print x > >   else >   print y i don't believe the python indent script will recognize the else as

python auto indentation problem of indent/python.vim

2009-09-30 Thread Peng Yu
Hi, I have the following lines in my .vimrc and I installed indent/ python.vim from http://www.vim.org/scripts/script.php?script_id=974 fun BenIndent() let oldLine=line('.') normal gg=G execute ':' . oldLine endfun map -- :call BenIndent() However, it will not correctly indent my code. Su