beginner: zo fails when start + end marker in same line?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

beginner: zo fails when start + end marker in same line?

fkater@googlemail.com

Hi,

I am trying out foldmarkers={,} in a *.txt ftplugin. Folding and
unfolding (zo/zc) works as expected for a text like this:

a line{
        some text
        some text
}

But if I have something like this in it

a line{some text} some text

then vim shows my this line as beeing folded, however, I can't unfold
(zo failes). Further, all lines below this fold are disappeard (it seem
that they are consumed by this fold).

What's wrong here?

Felix

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: beginner: zo fails when start + end marker in same line?

Antony Scriven-3

On 25/07/07, Felix Kater <[hidden email]> wrote:

 > I am trying out foldmarkers={,} in a *.txt ftplugin. Folding and
 > unfolding (zo/zc) works as expected for a text like this:
 >
 > a line{
 >         some text
 >         some text
 > }
 >
 > But if I have something like this in it
 >
 > a line{some text} some text
 >
 > then vim shows my this line as beeing folded, however, I can't unfold
 > (zo failes). Further, all lines below this fold are disappeard (it seem
 > that they are consumed by this fold).

Hi, I can't reproduce that. Actually I can't get your second
example to fold, even though there is a `-' in the
foldcolumn. This is what I'd expect. However I start with
your first example, close it then open it and then join the
lines into one, then vim will allow me to fold the single
line. I did not expect that. However unlike you I can open
it again. --Antony

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: beginner: zo fails when start + end marker in same line?

fkater@googlemail.com

On Wed, 25 Jul 2007 13:21:32 +0100
"Antony Scriven" <[hidden email]> wrote:

> Hi, I can't reproduce that.

Ok, thanks, I've reduced my test.txt to the bare mimimum to reproduce my
issue:

[beginning of test.txt]
line 1{

{abc}

{123}

}

[end of test.txt]

Could anyone try this out:

* Use foldmarkers {,}
* Open the file
* zo in line 1

Now, watch the strange things happen:

* Lines 1-5 are unfolded (expected 1-7)
* Line 3 does not appear folded (probably ok), however, line 5 does!
* Note: the bare difference between 3 and 5 is that 5 starts with
numbers.
* Further, 'zo' fails on line 5 (workaround: pressing 'i' in that line)


What's wrong here?
Thank You

Felix

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: beginner: zo fails when start + end marker in same line?

Tony Mechelynck

Felix Kater wrote:

> On Wed, 25 Jul 2007 13:21:32 +0100
> "Antony Scriven" <[hidden email]> wrote:
>
>> Hi, I can't reproduce that.
>
> Ok, thanks, I've reduced my test.txt to the bare mimimum to reproduce my
> issue:
>
> [beginning of test.txt]
> line 1{
>
> {abc}
>
> {123}
>
> }
>
> [end of test.txt]
>
> Could anyone try this out:
>
> * Use foldmarkers {,}
> * Open the file
> * zo in line 1
>
> Now, watch the strange things happen:
>
> * Lines 1-5 are unfolded (expected 1-7)
> * Line 3 does not appear folded (probably ok), however, line 5 does!
> * Note: the bare difference between 3 and 5 is that 5 starts with
> numbers.
> * Further, 'zo' fails on line 5 (workaround: pressing 'i' in that line)
>
>
> What's wrong here?
> Thank You
>
> Felix

numbers after the fold-marker define the fold-level of that fold. The higher
the number, the deeper the fold. See ":help fold-marker".


Best regards,
Tony.
--
For a good time, call (415) 642-9483

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: beginner: zo fails when start + end marker in same line?

fkater@googlemail.com

On Thu, 26 Jul 2007 10:34:47 +0200
Tony Mechelynck <[hidden email]> wrote:

> numbers after the fold-marker define the fold-level of that fold. The
> higher the number, the deeper the fold. See ":help fold-marker".

Thanks... So it was at least wise to mark this subject 'beginner'. ;-)

Felix

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---