Ben Schmidt wrote:

> >> I have a prototype of what I think the final product should look like
> >> (see attached) but sticking it into the actual code is proving more
> >> difficult than I originally thought.
> 
> Hehe. That doesn't surprise me at all. That's why I was going to put it
> on my to do list, and not attempt it for a while. :-)
> 
> >> I'll work on it some more this week, but if someone wants to comment
> >> on the html/javascript/css that's good.
> 
> It's essentially the approach I would have taken, so it looks good to
> me!
> 
> >> Problems I am running into include:
> >> * handling the line number
> 
> I'm not sure what you mean by that.
> 
> >> * getting the fold text for folds that aren't currently closed
> 
> I thought of that. I think you'll have to :set foldlevel=0 at the start
> of 2html to deal with this. The real difficulty is if you want to
> preserve the current fold state; I wouldn't.
> 
> >> * handling multiple folds that open on the same line
> 
> And that. I think you have to solve that one by opening the folds one at
> a time after you process each, until you've exhausted all the folds at a
> given line.
> 
> >> I think it will be way more trouble than it is worth to do this
> >> without using css, so I plan to just disable the feature if css is not
> >> being used.
> 
> I agree.
> 
> > I think we don't need the foldcolumn in HTML.  One can click on the fold
> > to open it, and on the text to close it again.  That's a lot simpler and
> > removes the not-so-nice-looking fold column.
> 
> How do you solve the ambiguity problem when there are two folds starting
> on the same line without the foldcolumn though (i.e. whether a click
> should open the second fold or close the first)? If they can appear
> beside each other in the foldcolumn, as in the prototype, that solves
> that problem quite nicely. I think.

The same way it works for nested structures: first click opens the first
level, second click the second level, etc.

For closing you would have to click on the text of the opened fold, not
a closed fold at the start of that fold.

> Are there other edge cases that need to be accounted for?

-- 
Dreams are free, but there's a small charge for alterations.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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

Raspunde prin e-mail lui