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

RE: listchars

Expand Messages
  • John Beckett
    ... Just leave out the eol . See: http://vim.wikia.com/wiki/Highlight_unwanted_spaces John --~--~---------~--~----~------------~-------~--~----~ You received
    Message 1 of 5 , May 1, 2009
    • 0 Attachment
      ball wrote:
      > How do you say, "Show me a tab, but don't show me EOL's?"

      Just leave out the 'eol'. See:
      http://vim.wikia.com/wiki/Highlight_unwanted_spaces

      John


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... That won t work, it will use the default, which is a dollar sign. The idea is to replace the eol by a space, but for that, you must remember that in the
      Message 2 of 5 , May 1, 2009
      • 0 Attachment
        On 02/05/09 01:31, John Beckett wrote:
        >
        > ball wrote:
        >> How do you say, "Show me a tab, but don't show me EOL's?"
        >
        > Just leave out the 'eol'. See:
        > http://vim.wikia.com/wiki/Highlight_unwanted_spaces
        >
        > John

        That won't work, it will use the default, which is a dollar sign.

        The idea is to replace the eol by a space, but for that, you must
        remember that in the "value" part of a ":set option=value" statement,
        the following must be backslash-escaped:

        - backslashes, otherwise they are seen as escape characters
        - double quotes, otherwise they start a comment
        - vertical bars, otherwise they start another ex-command on the same line
        - spaces and tabs, otherwise they terminate the ":set" statement

        So you need to use a backslash-escaped space as the value for the "eol"
        suboption, and to make it obvious that there _is_ a space, we'll place
        it before the "tab" suboption, as follows:

        :set list listchars=eol:\ ,tab:>-

        Similarly, to show non-standard (but non-blank) eols but standard white
        tabs, once upon a time I used:

        :set list listchars=tab:\ \ ,eol:¶

        ("tab:" left out would display tabs as ^I which I did _not_ want.)

        Nowadays I use

        :set list listchars=eol:¶,tab:\|_,nbsp:~

        which is slightly more complex but displays no-break spaces (directly,
        as blue tildes), end-of-line spaces (indirectly, by showing the EOL) and
        tabs as one bar followed by zero or more underscores (illustrating the
        need to escape the bar).


        Best regards,
        Tony.
        --
        THIS IS PLEDGE WEEK FOR THE FORTUNE PROGRAM

        If you like the fortune program, why not support it now with your
        contribution of a pithy fortune, clean or obscene? We cannot continue
        without your support. Less than 14% of all fortune users are
        contributors. That means that 86% of you are getting a free ride. We
        can't go on like this much longer. Federal cutbacks mean less money
        for fortunes, and unless user contributions increase to make up the
        difference, the fortune program will have to shut down between midnight
        and 8 a.m. Don't let this happen. Mail your fortunes right now to
        "fortune". Just type in your favorite pithy saying. Do it now before
        you forget. Our target is 300 new fortunes by the end of the week.
        Don't miss out. All fortunes will be acknowledged. If you contribute
        30 fortunes or more, you will receive a free subscription to "The
        Fortune Hunter", our monthly program guide. If you contribute 50 or
        more, you will receive a free "Fortune Hunter" coffee mug ....

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • John Beckett
        ... Are you sure that s true for current Vim? I rarely use listchars, but the following seems to show tabs and nothing ... John
        Message 3 of 5 , May 1, 2009
        • 0 Attachment
          Tony Mechelynck wrote:
          >> Just leave out the 'eol'. See:
          >> http://vim.wikia.com/wiki/Highlight_unwanted_spaces
          >
          > That won't work, it will use the default, which is a dollar sign.

          Are you sure that's true for current Vim? I rarely use
          listchars, but the following seems to show tabs and nothing
          for eol:

          :set list listchars=tab:>-

          John


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Tony Mechelynck
          ... I tried, and you re right. Then I checked the help, and it s documented the way you say it. What s more, in 6.0.0 it was already documented the way you say
          Message 4 of 5 , May 1, 2009
          • 0 Attachment
            On 02/05/09 04:32, John Beckett wrote:
            >
            > Tony Mechelynck wrote:
            >>> Just leave out the 'eol'. See:
            >>> http://vim.wikia.com/wiki/Highlight_unwanted_spaces
            >>
            >> That won't work, it will use the default, which is a dollar sign.
            >
            > Are you sure that's true for current Vim? I rarely use
            > listchars, but the following seems to show tabs and nothing
            > for eol:
            >
            > :set list listchars=tab:>-
            >
            > John

            I tried, and you're right. Then I checked the help, and it's documented
            the way you say it. What's more, in 6.0.0 it was already documented the
            way you say it, and I never used Vim 5, so I wasn't confusing it with an
            older status of the same option.

            Score one for blabbering away without checking the docs.


            Best regards,
            Tony.
            --
            If all be true that I do think,
            There be Five Reasons why one should Drink;
            Good friends, good wine, or being dry,
            Or lest we should be by-and-by,
            Or any other reason why.

            --~--~---------~--~----~------------~-------~--~----~
            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.