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

Re: Folded line highlighting based on level and/or syntax

Expand Messages
  • Noel Henson
    ... We have a set of scripts that adds a outliner/organizer on top of VIM. We use different colors to show different levels of folds, when the folds are open.
    Message 1 of 6 , Oct 1, 2009
    • 0 Attachment
      On Thursday 01 October 2009, Ben Fritz wrote:
      > On Sep 30, 2:49 pm, Noel Henson <n...@...> wrote:
      > > Apparently the last approach was not a good one. Are there any
      > > suggestions for methods that would be acceptable for highlighting
      > > folded lines based on level and/or content (syntax)?
      >
      > What is "the last approach", and what are you trying to accomplish?
      > "Highlighting folded lines based on level and/or content" doesn't mean
      > much to me.
      >
      We have a set of scripts that adds a outliner/organizer on top of VIM. We
      use different colors to show different levels of folds, when the folds are
      open. When the folds are closed, all show the same color. We would like VIM
      to allow for different colors/highlighting for folded folds. These can be
      dependent upon the fold level, indent and or contents of the fold.

      Unfortunately, there is only one attribute that specifies a closed fold and
      therefore only one highlight that can be use. I created a patch a short
      time ago that allows the highlighting to be specified by a user script and
      thus closed folds can be highlighted uniquely or in groups by whatever
      criteria a user wants. If no user script (expression) is provided, VIM
      defaults to its original behavior.

      That's about it.

      Noel




      --

      ------------------------------------------------------------------
      Noel Henson
      www.noels-lab.com Chips, firmware and embedded systems
      www.vimoutliner.org Work fast. Think well.


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Jaguar
      Hi, I m wishing for the same functionality, for almost the same use case. At first I thought the highlighting should be based simply on the normal highlighting
      Message 2 of 6 , Oct 1, 2009
      • 0 Attachment
        Hi,

        I'm wishing for the same functionality, for almost the same use case.

        At first I thought the highlighting should be based simply on the
        normal highlighting for the line. But then I thought the 'foldtext'
        option could be made as robust as the 'statusline' option. If the
        'foldtext' option could support options like statusline's options: {,
        #, and *, then the folded line could be highlighted manually.

        Here's a link to the thread I started on the subject in April. It
        also explains my use case:

        http://groups.google.com/group/vim_dev/browse_thread/thread/69e47e0780dd3d30/566b7effc51293c0#566b7effc51293c0

        Thanks,
        Jaguar


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Noel Henson
        ... It looks like you re doing something very similar to what we are with Vim Outliner. You can look at my posts on 9/13 to see that patch for vim. It uses a
        Message 3 of 6 , Oct 1, 2009
        • 0 Attachment
          On Thursday 01 October 2009, Jaguar wrote:
          > Hi,
          >
          > I'm wishing for the same functionality, for almost the same use case.
          >
          > At first I thought the highlighting should be based simply on the
          > normal highlighting for the line. But then I thought the 'foldtext'
          > option could be made as robust as the 'statusline' option. If the
          > 'foldtext' option could support options like statusline's options: {,
          > #, and *, then the folded line could be highlighted manually.
          >
          > Here's a link to the thread I started on the subject in April. It
          > also explains my use case:
          >
          > http://groups.google.com/group/vim_dev/browse_thread/thread/69e47e0780dd
          >3d30/566b7effc51293c0#566b7effc51293c0
          >
          > Thanks,
          > Jaguar
          >

          It looks like you're doing something very similar to what we are with Vim
          Outliner. You can look at my posts on 9/13 to see that patch for vim. It
          uses a simple method similar to foldexpr. It's called foldhighlight.

          Noel

          --

          ------------------------------------------------------------------
          Noel Henson
          www.noels-lab.com Chips, firmware and embedded systems
          www.vimoutliner.org Work fast. Think well.


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Wu, Yue
          ... Sounds so many guys want this feature(I do too, with the exact same purpose). Don t know why vim can t at present, for hard to implement or other reasons?
          Message 4 of 6 , Oct 1, 2009
          • 0 Attachment
            On Thu, Oct 01, 2009 at 02:11:28PM -0700, Noel Henson wrote:
            >
            > It looks like you're doing something very similar to what we are with Vim
            > Outliner. You can look at my posts on 9/13 to see that patch for vim. It
            > uses a simple method similar to foldexpr. It's called foldhighlight.

            Sounds so many guys want this feature(I do too, with the exact same purpose).
            Don't know why vim can't at present, for hard to implement or other reasons?

            --
            Hi,
            Wu, Yue

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.