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

Re: Re[2]: A possible enhancement for the next release: regions

Expand Messages
  • Brett Pershing Stahlman
    ... From: Giuseppe Bilotta To: Benji Fisher Cc: Sent: Sunday, November 24, 2002 5:13 PM Subject:
    Message 1 of 8 , Dec 2, 2002
      ----- Original Message -----
      From: Giuseppe Bilotta <gip.bilotta@...>
      To: Benji Fisher <fisherbb@...>
      Cc: <vim-dev@...>
      Sent: Sunday, November 24, 2002 5:13 PM
      Subject: Re[2]: A possible enhancement for the next release: regions


      > On Sunday, November 24, 2002 Benji Fisher wrote:
      >
      > > In some situations, it is already possible to get this sort of
      > > behavior. For example, an indent script can check the value of the
      > > current syntax region, and return a value appropriate for the embedded
      > > file type. I think there are already some scripts that work this way,
      > > but maybe not yet any in the standard distribution.
      >
      > > This approach relies on the syntax files to determine the embedded
      > > file types. This is probably A Good Thing.
      >
      > > :help synID()
      >
      > I'm not much an expert about syntax highlighting ... is it
      > possible to define syntax regions without actually 'highlighting'
      > them?
      Yes. You simply do not link the region to one of the predefined regions that
      have highlighting defined for them (e.g., Comment, String, Error, etc...).
      Alternatively, you can define a region as transparent, to ensure that the
      highlighting of the containing region shows through.

      >
      > In either case, I think the regions thing should come "before"
      > syntax highlight. We can make the two things cooperate by:
      > (1) allowing syntax highlight groups to be defined based on
      > regions
      > (2) allowing syntax groups definitions to automatically define
      > regions [sort of like folds being defined by indents]

      In my opinion, folding would be more useful if it could be made to act in a
      non-linewise manner. Not allowing 2 different folds to exist on the same
      line seems to me to be an artificial limitation, given the fact that many
      useful programming languages are not line-oriented. I realize, of course,
      that allowing characterwise fold definitions would greatly complicate the
      implementation. Just wondering if anyone else has found this to be a
      limitation...

      Brett S.
      >
      > --
      > Giuseppe "Oblomov" Bilotta
      >
    • Giuseppe Bilotta
      ... I really can t think of a way characterwise folding could be implemented ... would you simply remove the collapsed chars (which might span a few lines)
      Message 2 of 8 , Dec 2, 2002
        On Monday, December 2, 2002 Brett Pershing Stahlman wrote:

        > In my opinion, folding would be more useful if it could be made to act in a
        > non-linewise manner. Not allowing 2 different folds to exist on the same
        > line seems to me to be an artificial limitation, given the fact that many
        > useful programming languages are not line-oriented. I realize, of course,
        > that allowing characterwise fold definitions would greatly complicate the
        > implementation. Just wondering if anyone else has found this to be a
        > limitation...

        I really can't think of a way characterwise folding could be
        implemented ... would you simply remove the "collapsed" chars
        (which might span a few lines) and virtually substitute them with
        a (possibly visible but one-char-wide-only) mark?

        --
        Giuseppe "Oblomov" Bilotta
      • Vince Negri
        ... Rather like the conceal patch... Vince Legal Disclaimer: Any views expressed by the sender of this message are not necessarily those of Application
        Message 3 of 8 , Dec 2, 2002
          > I really can't think of a way characterwise folding could be
          > implemented ... would you simply remove the "collapsed" chars
          > (which might span a few lines) and virtually substitute them with
          > a (possibly visible but one-char-wide-only) mark?

          Rather like the 'conceal' patch...

          Vince
          Legal Disclaimer: Any views expressed by the sender of this message are
          not necessarily those of Application Solutions Ltd. Information in this
          e-mail may be confidential and is for the use of the intended recipient
          only, no mistake in transmission is intended to waive or compromise such
          privilege. Please advise the sender if you receive this e-mail by mistake.
        • Brett Pershing Stahlman
          ... From: Vince Negri To: Giuseppe Bilotta ; Brett Pershing Stahlman Cc:
          Message 4 of 8 , Dec 2, 2002
            ----- Original Message -----
            From: Vince Negri <vnegri@...>
            To: 'Giuseppe Bilotta' <gip.bilotta@...>; Brett Pershing Stahlman
            <brett.stahlman@...>
            Cc: <vim-dev@...>
            Sent: Monday, December 02, 2002 9:23 AM
            Subject: RE: Re[4]: A possible enhancement for the next release: regions


            > > I really can't think of a way characterwise folding could be
            > > implemented ... would you simply remove the "collapsed" chars
            > > (which might span a few lines) and virtually substitute them with
            > > a (possibly visible but one-char-wide-only) mark?
            >
            > Rather like the 'conceal' patch...
            I have not tried the conceal patch, but yes, a one-character-wide glyph of
            some sort was what I had in mind. Perhaps some descriptive text for the
            fold, embedded within special delimiters in the original file, could be
            hidden along with the folded text, and shown only when requested with a
            special fold command.

            Brett S.
            >
            > Vince
            > Legal Disclaimer: Any views expressed by the sender of this message are
            > not necessarily those of Application Solutions Ltd. Information in this
            > e-mail may be confidential and is for the use of the intended recipient
            > only, no mistake in transmission is intended to waive or compromise such
            > privilege. Please advise the sender if you receive this e-mail by mistake.
            >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.