Loading ...
Sorry, an error occurred while loading the content.

converting manual (or syntax) folds to marker folds

Expand Messages
  • edgimar
    If I have several folds defined with foldmethod=manual or foldmethod=syntax, is there any way to convert all of these folds into marker-based folds (i.e.
    Message 1 of 3 , Feb 24 5:39 PM
    • 0 Attachment
      If I have several folds defined with foldmethod=manual or
      foldmethod=syntax, is there any way to convert all of these folds into
      marker-based folds (i.e. adding the markers) so that foldmethod=marker
      can be used with the previously defined/generated folds?


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • edgimar
      I assume the lack of responses to this inquiry means that there is probably not a known way of doing this. So, maybe this is better discussed on a devel. list?
      Message 2 of 3 , Mar 1, 2009
      • 0 Attachment
        I assume the lack of responses to this inquiry means that there is
        probably not a known way of doing this.

        So, maybe this is better discussed on a devel. list?

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Ben Fritz
        ... No, the vim_dev list is meant for the Vim C code and the officially distributed runtime files. You should be able to write a Vim script to do this. There
        Message 3 of 3 , Mar 4, 2009
        • 0 Attachment
          On Mar 1, 6:44 pm, edgimar <edgi...@...> wrote:
          > I assume the lack of responses to this inquiry means that there is
          > probably not a known way of doing this.
          >
          > So, maybe this is better discussed on a devel. list?

          No, the vim_dev list is meant for the Vim C code and the officially
          distributed runtime files.

          You should be able to write a Vim script to do this.

          There is a portion in my patch of 2html.vim (in the Syntax runtime
          directory) that loops through all the folds in a file, discovering
          their fold level (among other things). You can probably do something
          very similar, but on discovering a fold you could append {{{ to the
          line, and }}} whenever the fold ends. See this thread if you're
          interested:

          http://groups.google.com/group/vim_dev/browse_thread/thread/84bcdc1a7e56e14d/7698859b73dfa6d7
          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        Your message has been successfully submitted and would be delivered to recipients shortly.