[Vimoutliner] outline level numbering is wacked?

Sam Roberts sroberts at uniserve.com
Mon Mar 12 15:32:08 EST 2007


Quoting slitt at troubleshooters.com, on Sun, Mar 11, 2007 at 11:43:02PM -0400:
> > Do you not expect the first column on the left in a terminal to be used by
> > vim and vimoutliner to show the fold level?  
> 
> No. I think one upgrade of Vim put those there, but either the VO distro got 
> rid of it, or I put something in my .vimrc to get rid of it.
> 
> Anyway, now that I can reproduce your problem. With foldcolumn=1, mine looks 
> exactly like yours. With foldcolumn=3 and 5 it looks even more bizarre. All 
> three screenshots are attached...
> 
> Turns out the results you get happen when foldmethod=expr. If you switch 
> foldmethod=indent, all those columns are filled with lines.
> 
> I never use foldcolumn, so I can't say whether the numbers are an intentional 
> feature of VO or just a Vim side effect.

Thanks, that points at whats going on.

I don't have any foldsettings in my personal config, so I'm just using
what .vim/ftplugin/vo_base.vim sets at about line 80:

 foldcolumn=1
 foldmethod=expr
 foldexpr=MyFoldLevel(v:lnum)

I don't know enough vimscript to understand the MyFoldLevel function,
but it looks like it's not entirely correct.

And actually, I'm not too sure what its purpose is, since when I use
foldmethod=indent, it looks "right" - which makes sense, since
vimoutliner uses leading indents to indicate depth, just counting the
indent should be an easy way to get fold depth, shouldn't it?

Anyhow, I've put "setlocal foldmethod=indent" in my
.vim/after/ftplugin/vo_base.vim, and all is well, but someone who
understands these things might want to look at MyFoldLevel(), what I saw
was what anybody with a vanilla vim7 running in a terminal would see.

Thanks,
Sam



More information about the VimOutliner mailing list