Folding in vim

Ron Adam rrr at ronadam.com
Mon Jul 4 01:41:45 EDT 2005


Terry Hancock wrote:

> On Saturday 02 July 2005 10:35 pm, Terry Hancock wrote:
> 
>>I tried to load a couple of different scripts to 
>>automatically fold Python code in vim, but none of them
>>seems to do a good job.
>>
>>I've tried:
>>python_fold.vim by Jorrit Wiersma
>>    http://www.vim.org/scripts/script.php?script_id=515
> 
> 
> Actually, I think this one is doing what I want now. It seems
> to be that it isn't robust against files with lots of mixed tabs
> and spaces.  I also got "space_hi.vim" which highlights tabs
> and trailing spaces, which made it a lot easier to fix the 
> problem.

I edited my syntax coloring file to do the same thing.  Not to mention 
adding a few key words that were missing.  :-)

> After fixing my source files, python_fold seems to be able
> to handle them just fine.
> 
> I must also recommend C. Herzog's python_box.vim
> which is fantastic -- especially the automatic Table of
> Contents generation for Python source, and pydoc.vim
> which puts access to pydoc into the editor.

Sounds good. I'll give it a try!  :-)


> Nice.  Now that I have a "very sharp saw", I'm going to
> have to go cut some stuff for a bit. ;-)
 >
> --
> Terry Hancock ( hancock at anansispaceworks.com )
> Anansi Spaceworks  http://www.anansispaceworks.com
> 



More information about the Python-list mailing list