Monday, April 16, 2012

Re: Behavior of fold when adding new fold

On Sunday, April 15, 2012 2:32:09 AM UTC-5, Yichao Zhou wrote:
> Hi, everyone.
> I use fdm=marker. The problem is when you add a fold, the fold
> after it will automatically open.
>
> For example, type {{{<CR>}}}<ESC>zcggO{{{
>
> You will find the second fold is opened automatically. This is
> annoying when editing. Must I reclose all the folding when add a new
> one?
>

I realized after I posted, you should also consider using zf to create fold markers rather than going into insert mode, which should prevent this problem altogether.

:help zf

Note that the 'commentstring' option is used to determine what text to place before the created fold markers.

:help fold-create-marker
:help 'commentstring'

--
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: