Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Behavior of fold when adding new fold
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Yichao Zhou  
View profile  
 More options Apr 15 2012, 3:32 am
From: Yichao Zhou <broken.z...@gmail.com>
Date: Sun, 15 Apr 2012 15:32:09 +0800
Local: Sun, Apr 15 2012 3:32 am
Subject: Behavior of fold when adding new fold
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?

Regards,
Yichao Zhou


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Brabandt  
View profile  
 More options Apr 15 2012, 4:28 am
From: Christian Brabandt <cbli...@256bit.org>
Date: Sun, 15 Apr 2012 10:28:52 +0200
Local: Sun, Apr 15 2012 4:28 am
Subject: Re: Behavior of fold when adding new fold
Hi Yichao!

On So, 15 Apr 2012, 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?

Have you checked your 'foldlevel' setting?

regards,
Christian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marcin Szamotulski  
View profile  
 More options Apr 15 2012, 5:44 am
From: Marcin Szamotulski <msza...@gmail.com>
Date: Sun, 15 Apr 2012 10:44:19 +0100
Local: Sun, Apr 15 2012 5:44 am
Subject: Re: Behavior of fold when adding new fold
On 15:32 Sun 15 Apr     , Yichao Zhou wrote:

The tip is to first put closing marker }}} and then the opening one {{{.
You can also use {{{1 (without adding closing marker, the next {{{1 serves as
opening and closing marker)

Best,
Marcin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yichao Zhou  
View profile  
 More options Apr 15 2012, 10:42 pm
From: Yichao Zhou <broken.z...@gmail.com>
Date: Mon, 16 Apr 2012 10:42:34 +0800
Local: Sun, Apr 15 2012 10:42 pm
Subject: Re: Behavior of fold when adding new fold
Unfortunately, "{{{1" has the same problem.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Fritz  
View profile  
 More options Apr 16 2012, 3:06 pm
From: Ben Fritz <fritzophre...@gmail.com>
Date: Mon, 16 Apr 2012 12:06:09 -0700 (PDT)
Local: Mon, Apr 16 2012 3:06 pm
Subject: 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?

> Regards,
> Yichao Zhou

If you usually add open/close folds in the same insert operation, this will help:

http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text

If you need to move around a bunch in normal mode before adding the closing marker, it won't help as much.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Fritz  
View profile  
 More options Apr 16 2012, 3:09 pm
From: Ben Fritz <fritzophre...@gmail.com>
Date: Mon, 16 Apr 2012 12:09:02 -0700 (PDT)
Local: Mon, Apr 16 2012 3:09 pm
Subject: 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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »