Saturday, January 22, 2011

Re: foldcolumn on non manual foldmethod

Hi sergio!

On Do, 20 Jan 2011, sergio wrote:

> Hello.
>
> I want make foldcolumn visible only when foldmethod is not manual.
> Where is the best place for this:
> if &foldmethod != 'manual'
> set foldcolumn=1
> endif
> ?
>

I think your best thing to do is set up a CursorHold autocommand:
:au CursorHold * if &foldmethod != 'manual' | set fdc=1|else |set fdc=0 |endif
(one line)

You might want to adjust the value of 'updatetime', though.

See
:h 'updatetime'
:h CursorHold

regards,
Christian

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: