A response to this thread:
http://groups.google.com/group/vim_use/browse_thread/thread/8532e7236f113ab7/a88235ef57bd1b5c
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.
I'll work on it some more this week, but if someone wants to comment
on the html/javascript/css that's good. If someone more familiar with
2html.vim wants to code this (or another) solution that's fine too.
Suggestions are also welcome :-)
Basically I'm trying to replicate the fold column in the html, using a
span around each folded area with the class attribute controlling
whether it is folded or not. The class is used by the css to hide or
show the text as appropriate. The javascript changes the class
attribute to indicate when the fold status changes. If the html
initializes the class to show the fold state when 2html.vim was
sourced, then the page will initially load with the folds in the same
state even if no javascript is available.
Problems I am running into include:
* handling the line number
* getting the fold text for folds that aren't currently closed
* handling multiple folds that open on the same 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.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
Title: Fold toggle proof of concept
This is a normal line.
+ This is a folded line. --- 4 lines folded- This is a folded line.
| This is another folded line.
|+ This is a nested fold --- 2 lines folded|- This is a nested fold
|| This is another folded line.
+ This is a folded line. --- 5 lines folded- This is a folded line.
| This is another folded line.
|+ This is a nested fold --- 2 lines folded|- This is a nested fold
|| This is another folded line.
| And another at the lower fold level.