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

Re: suggestion: User syntax cluster

Expand Messages
  • Dan Sharp
    ... He is asking for something like the attached patch against 6.0.158. His original note was that when he does ... then as you type a line, every time you
    Message 1 of 4 , Feb 1 11:52 AM
    • 0 Attachment
      >From: Bram Moolenaar <Bram@...>
      >
      >
      >Kontra Gergely wrote:
      >
      > > >Can't you use the "containedin" argument? ":help :syn-containedin"
      > >
      > > Ok, but please patch vim so with set lists in the current line it
      > > doesn't hurt me, pls
      >
      >Sorry, I don't understand this sentence.

      He is asking for something like the attached patch against 6.0.158. His
      original note was that when he does

      :set list lcs=tab:>-,trail:-

      then as you type a line, every time you hit the spacebar, it is replaced by
      trail-char, up until you hit another character, at which point the
      trail-chars are replaced by spaces. This causes a sort of flash on the
      screen from the trail-chars constantly appearing and disappearing. He
      wanted a way to turn off displaying trail-chars for the current line only.

      The attached patch demonstrates this. Only blanks are displayed when you
      hit space on the current line. When you hit return, then the trailing
      blanks are converted to trail-chars. Of course, with this patch, the blanks
      are not converted if, instead of hitting return, you hit ESC or an arrow
      key, so the patch is by no means complete. But hopefully it illustrates the
      idea.

      Dan Sharp


      _________________________________________________________________
      Join the world�s largest e-mail service with MSN Hotmail.
      http://www.hotmail.com
    • Bram Moolenaar
      ... Sorry, I didn t see this connection. The problem is indeed with highlighting depending on the cursor position. It would mean that all cursor-movement
      Message 2 of 4 , Feb 1 1:02 PM
      • 0 Attachment
        Dan Sharp wrote:

        > > > Ok, but please patch vim so with set lists in the current line it
        > > > doesn't hurt me, pls
        > >
        > >Sorry, I don't understand this sentence.
        >
        > He is asking for something like the attached patch against 6.0.158. His
        > original note was that when he does
        >
        > :set list lcs=tab:>-,trail:-
        >
        > then as you type a line, every time you hit the spacebar, it is replaced by
        > trail-char, up until you hit another character, at which point the
        > trail-chars are replaced by spaces. This causes a sort of flash on the
        > screen from the trail-chars constantly appearing and disappearing. He
        > wanted a way to turn off displaying trail-chars for the current line only.
        >
        > The attached patch demonstrates this. Only blanks are displayed when you
        > hit space on the current line. When you hit return, then the trailing
        > blanks are converted to trail-chars. Of course, with this patch, the blanks
        > are not converted if, instead of hitting return, you hit ESC or an arrow
        > key, so the patch is by no means complete. But hopefully it illustrates the
        > idea.

        Sorry, I didn't see this connection.

        The problem is indeed with highlighting depending on the cursor
        position. It would mean that all cursor-movement commands would have to
        check if the highlighting needs to be updated. This isn't easy and adds
        complexity. Don't count on this being implemented in the near future.

        --
        Although the scythe isn't pre-eminent among the weapons of war, anyone who
        has been on the wrong end of, say, a peasants' revolt will know that in
        skilled hands it is fearsome.
        -- (Terry Pratchett, Mort)

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
        \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
      • KONTRA Gergely
        ... [Bram:] ... Er. I think this can be solved almost in whole in vim. / s + %#$/ matches the whitespace at the end of line, and before the cursor. We need
        Message 3 of 4 , Feb 4 6:48 AM
        • 0 Attachment
          > The attached patch demonstrates this. Only blanks are displayed
          >when you > hit space on the current line. When you hit return, then
          >the trailing > blanks are converted to trail-chars. Of course, with
          >this patch, the blanks > are not converted if, instead of hitting
          >return, you hit ESC or an arrow > key, so the patch is by no means
          >complete. But hopefully it illustrates the > idea.

          [Bram:]
          >The problem is indeed with highlighting depending on the cursor
          >position. It would mean that all cursor-movement commands would have to
          >check if the highlighting needs to be updated. This isn't easy and adds
          >complexity. Don't count on this being implemented in the near future.

          Er. I think this can be solved almost in whole in vim.
          /\s\+\%#$/ matches the whitespace at the end of line, and
          before the cursor.

          We need normal highlighting for it, and special highlighting for other
          trailing spaces.
          Gergo

          +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
          | Email: CHANGED! kgergely@... kgergely@... (old) |
          | URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
          +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
          .
          Magyar php mirror es magyar php dokumentacio: http://hu.php.net
        • KONTRA Gergely
          ... Syntax must be updated, when you leave insert mode. So? Is it nonsense? Worth to play with? Impossible? Gergo +-[Kontra, Gergely @ Budapest University of
          Message 4 of 4 , Feb 8 5:59 AM
          • 0 Attachment
            >Er. I think this can be solved almost in whole in vim.
            >/\s\+\%#$/ matches the whitespace at the end of line, and
            >before the cursor.
            >
            >We need normal highlighting for it, and special highlighting for other
            >trailing spaces.

            Syntax must be updated, when you leave insert mode.

            So?

            Is it nonsense? Worth to play with? Impossible?

            Gergo
            +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
            | Email: kgergely@... kgergely@... |
            | URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
            +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
            .
            Magyar php mirror es magyar php dokumentacio: http://hu.php.net
          Your message has been successfully submitted and would be delivered to recipients shortly.