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

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

Ben.




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

Raspunde prin e-mail lui