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

Patch: support for the "space" argument for "listchars"

Expand Messages
  • Jérémie Roquet
    Hello, I ve just started to use Vim, and missed the possibility to display middle-dots (or any other visible character) instead of spaces, so I made the
    Message 1 of 27 , Oct 21, 2009
      Hello,

      I've just started to use Vim, and missed the possibility to display
      middle-dots (or any other visible character) instead of spaces, so I
      made the following patch.
      It adds "space" in the allowed "listchars" arguments.

      Just in case someone find this useful ; I found easier to patch Vim
      than to look for another existing solution ;-)

      Best regards,

      Index: option.c
      ===================================================================
      --- option.c (revision 1626)
      +++ option.c (working copy)
      @@ -6847,6 +6847,7 @@
      {&lcs_ext, "extends"},
      {&lcs_nbsp, "nbsp"},
      {&lcs_prec, "precedes"},
      + {&lcs_space, "space"},
      {&lcs_tab2, "tab"},
      {&lcs_trail, "trail"},
      };
      Index: screen.c
      ===================================================================
      --- screen.c (revision 1626)
      +++ screen.c (working copy)
      @@ -3886,6 +3886,18 @@
      #endif
      }

      + /* 'list' : change space to lcs_space. */
      + if (wp->w_p_list && c == ' ' && lcs_space)
      + {
      + c = lcs_space;
      + if (area_attr == 0 && search_attr == 0)
      + {
      + n_attr = 1;
      + extra_attr = hl_attr(HLF_8);
      + saved_attr2 = char_attr; /* save current attr */
      + }
      + }
      +
      if (extra_check)
      {
      #ifdef FEAT_SPELL
      @@ -4040,7 +4052,7 @@
      }
      #endif

      - if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
      + if (trailcol != MAXCOL && ptr > line + trailcol && (c == ' ' || c
      == lcs_space))
      {
      c = lcs_trail;
      if (!attr_pri)
      Index: globals.h
      ===================================================================
      --- globals.h (revision 1626)
      +++ globals.h (working copy)
      @@ -1146,6 +1146,7 @@
      EXTERN int lcs_tab1 INIT(= NUL);
      EXTERN int lcs_tab2 INIT(= NUL);
      EXTERN int lcs_trail INIT(= NUL);
      +EXTERN int lcs_space INIT(= NUL);

      #if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT) \
      || defined(FEAT_FOLDING)

      --
      Jérémie Roquet - Arkanosis
      Programming artist
      Developer in natural language processing - Exalead

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Steve Hall
      From: Jérémie_Roquet, Wed, October 21, 2009 10:26 am ... Nice! Bram, any chance this could become official? -- Steve Hall [ digitect dancingpaper com ]
      Message 2 of 27 , Oct 21, 2009
        From: Jérémie_Roquet, Wed, October 21, 2009 10:26 am
        >
        > I've just started to use Vim, and missed the possibility to display
        > middle-dots (or any other visible character) instead of spaces, so I
        > made the following patch.
        > It adds "space" in the allowed "listchars" arguments.

        Nice! Bram, any chance this could become official?


        --
        Steve Hall [ digitect dancingpaper com ]



        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Jérémie Roquet
        ... I m sorry, the previous patch cause a segmentation fault if you don t use the space argument. The following fixes this (added && lcs_space in
        Message 3 of 27 , Oct 21, 2009
          2009/10/21 Jérémie Roquet <arkanosis@...>:
          > I've just started to use Vim, and missed the possibility to display
          > middle-dots (or any other visible character) instead of spaces, so I
          > made the following patch.
          > [...]

          I'm sorry, the previous patch cause a segmentation fault if you don't
          use the "space" argument.
          The following fixes this (added "&& lcs_space" in screen.c).

          Again, sorry for this.

          Best regards,

          Index: option.c
          ===================================================================
          --- option.c (revision 1626)
          +++ option.c (working copy)
          @@ -6847,6 +6847,7 @@
          {&lcs_ext, "extends"},
          {&lcs_nbsp, "nbsp"},
          {&lcs_prec, "precedes"},
          + {&lcs_space, "space"},
          {&lcs_tab2, "tab"},
          {&lcs_trail, "trail"},
          };
          Index: screen.c
          ===================================================================
          --- screen.c (revision 1626)
          +++ screen.c (working copy)
          @@ -3886,6 +3886,18 @@
          #endif
          }

          + /* 'list' : change space to lcs_space. */
          + if (wp->w_p_list && c == ' ' && lcs_space)
          + {
          + c = lcs_space;
          + if (area_attr == 0 && search_attr == 0)
          + {
          + n_attr = 1;
          + extra_attr = hl_attr(HLF_8);
          + saved_attr2 = char_attr; /* save current attr */
          + }
          + }
          +
          if (extra_check)
          {
          #ifdef FEAT_SPELL
          @@ -4040,7 +4052,7 @@
          }
          #endif

          - if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
          + if (trailcol != MAXCOL && ptr > line + trailcol && (c == ' ' || c
          == lcs_space && lcs_space))
          {
          c = lcs_trail;
          if (!attr_pri)
          Index: globals.h
          ===================================================================
          --- globals.h (revision 1626)
          +++ globals.h (working copy)
          @@ -1146,6 +1146,7 @@
          EXTERN int lcs_tab1 INIT(= NUL);
          EXTERN int lcs_tab2 INIT(= NUL);
          EXTERN int lcs_trail INIT(= NUL);
          +EXTERN int lcs_space INIT(= NUL);

          #if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT) \
          || defined(FEAT_FOLDING)

          --
          Jérémie Roquet - Arkanosis
          Programming artist
          Developer in natural language processing - Exalead

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Bram Moolenaar
          ... I m confused. It appears the space character is both used to display instead of a space character when list is on, and to find this character after
          Message 4 of 27 , Oct 28, 2009
            Jérémie Roquet wrote:

            > I've just started to use Vim, and missed the possibility to display
            > middle-dots (or any other visible character) instead of spaces, so I
            > made the following patch.
            > It adds "space" in the allowed "listchars" arguments.
            >
            > Just in case someone find this useful ; I found easier to patch Vim
            > than to look for another existing solution ;-)

            I'm confused. It appears the "space" character is both used to display
            instead of a space character when 'list' is on, and to find this
            character after the end of the line and replace it with "trail".
            To me these are two unrelated things.

            I'm not sure how useful it is to show something instead of a space.
            Isn't it obvious that there is a space when there is nothing?

            --
            Two cows are standing together in a field. One asks the other:
            "So what do you think about this Mad Cow Disease?"
            The other replies: "That doesn't concern me. I'm a helicopter."

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\ download, build and distribute -- http://www.A-A-P.org ///
            \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Steve Hall
            ... Bram, I can t speak for the author, but I d like this feature to make it easy to visualize: * other non-printing characters that look like dec 032 * double
            Message 5 of 27 , Oct 28, 2009
              On Wed, 2009-10-28 at 22:06 +0100, Bram Moolenaar wrote:
              >
              > I'm not sure how useful it is to show something instead of a space.
              > Isn't it obvious that there is a space when there is nothing?

              Bram, I can't speak for the author, but I'd like this feature to make
              it easy to visualize:

              * other non-printing characters that look like dec 032
              * double spaces
              * spaces after chars at window edges with wrap on
              * every char as a byte

              Currently, Vim can show every "invisible" character except
              intermediate spaces, why not add it and be complete? :)

              --
              Steve Hall [ digitect dancingpaper com ]



              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_dev" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Jérémie Roquet
              Hello, ... You are right. This was because spaces were already replaced at that point, making the replacement with trail impossible. But it leads to side
              Message 6 of 27 , Oct 29, 2009
                Hello,

                2009/10/28 Bram Moolenaar <Bram@...>:
                >> It adds "space" in the allowed "listchars" arguments.
                > I'm confused.  It appears the "space" character is both used to display
                > instead of a space character when 'list' is on, and to find this
                > character after the end of the line and replace it with "trail".
                > To me these are two unrelated things.

                You are right. This was because spaces were already replaced at that
                point, making the replacement with "trail" impossible.
                But it leads to side effects if the "space replacement" character is
                actually used in the edited file.

                Here is a new patch without this annoying side-effect.

                > I'm not sure how useful it is to show something instead of a space.
                > Isn't it obvious that there is a space when there is nothing?

                Sometimes it's not : I'm using a visible character for the first
                column of tabs, but an invisible one for the remaining columns.
                So cases where a tab is followed by a space are not that obvious.
                And as Steve pointed out, double spaces are not always obvious either.

                2009/10/29 Steve Hall <digitect@...>
                > Bram, I can't speak for the author, but I'd like this feature to make
                > it easy to visualize:
                > * other non-printing characters that look like dec 032
                > * double spaces
                > * spaces after chars at window edges with wrap on
                > * every char as a byte

                As for now, only the ' ' character is displayed, but it'd easy to support more.

                Best regards,

                Index: src/option.c
                ===================================================================
                --- src/option.c (revision 1626)
                +++ src/option.c (working copy)
                @@ -6847,6 +6847,7 @@
                {&lcs_ext, "extends"},
                {&lcs_nbsp, "nbsp"},
                {&lcs_prec, "precedes"},
                + {&lcs_space, "space"},
                {&lcs_tab2, "tab"},
                {&lcs_trail, "trail"},
                };
                Index: src/screen.c
                ===================================================================
                --- src/screen.c (revision 1626)
                +++ src/screen.c (working copy)
                @@ -3886,6 +3886,29 @@
                #endif
                }

                + /* 'list' : change space to lcs_space. */
                + if (wp->w_p_list && c == ' ' && lcs_space && ptr <= line + trailcol)
                + {
                + c = lcs_space;
                + if (area_attr == 0 && search_attr == 0)
                + {
                + n_attr = 1;
                + extra_attr = hl_attr(HLF_8);
                + saved_attr2 = char_attr; /* save current attr */
                + }
                +#ifdef FEAT_MBYTE
                + mb_c = c;
                + if (enc_utf8 && (*mb_char2len)(c) > 1)
                + {
                + mb_utf8 = TRUE;
                + u8cc[0] = 0;
                + c = 0xc0;
                + }
                + else
                + mb_utf8 = FALSE;
                +#endif
                + }
                +
                if (extra_check)
                {
                #ifdef FEAT_SPELL
                Index: src/globals.h
                ===================================================================
                --- src/globals.h (revision 1626)
                +++ src/globals.h (working copy)
                @@ -1146,6 +1146,7 @@
                EXTERN int lcs_tab1 INIT(= NUL);
                EXTERN int lcs_tab2 INIT(= NUL);
                EXTERN int lcs_trail INIT(= NUL);
                +EXTERN int lcs_space INIT(= NUL);

                #if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT) \
                || defined(FEAT_FOLDING)


                --
                Jérémie Roquet - Arkanosis
                Programming artist
                Developer in natural language processing - Exalead

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_dev" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Bram Moolenaar
                ... Well, I might consider including this. Can you write a patch for the documentation as well? -- TALL KNIGHT: When you have found the shrubbery, then you
                Message 7 of 27 , Oct 29, 2009
                  Jérémie Roquet wrote:

                  > 2009/10/28 Bram Moolenaar <Bram@...>:
                  > >> It adds "space" in the allowed "listchars" arguments.
                  > > I'm confused. It appears the "space" character is both used to display
                  > > instead of a space character when 'list' is on, and to find this
                  > > character after the end of the line and replace it with "trail".
                  > > To me these are two unrelated things.
                  >
                  > You are right. This was because spaces were already replaced at that
                  > point, making the replacement with "trail" impossible.
                  > But it leads to side effects if the "space replacement" character is
                  > actually used in the edited file.
                  >
                  > Here is a new patch without this annoying side-effect.
                  >
                  > > I'm not sure how useful it is to show something instead of a space.
                  > > Isn't it obvious that there is a space when there is nothing?
                  >
                  > Sometimes it's not : I'm using a visible character for the first
                  > column of tabs, but an invisible one for the remaining columns.
                  > So cases where a tab is followed by a space are not that obvious.
                  > And as Steve pointed out, double spaces are not always obvious either.
                  >
                  > 2009/10/29 Steve Hall <digitect@...>
                  > > Bram, I can't speak for the author, but I'd like this feature to make
                  > > it easy to visualize:
                  > > * other non-printing characters that look like dec 032
                  > > * double spaces
                  > > * spaces after chars at window edges with wrap on
                  > > * every char as a byte
                  >
                  > As for now, only the ' ' character is displayed, but it'd easy to
                  > support more.

                  Well, I might consider including this. Can you write a patch for the
                  documentation as well?

                  --
                  TALL KNIGHT: When you have found the shrubbery, then you must cut down the
                  mightiest tree in the forest ... with a herring.
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

                  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                  /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                  \\\ download, build and distribute -- http://www.A-A-P.org ///
                  \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_dev" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • Jérémie Roquet
                  ... Sure. Here is what I supposed was to be updated; please let me know if there is some other documentation to patch. Best regards, Index:
                  Message 8 of 27 , Oct 30, 2009
                    2009/10/29 Bram Moolenaar <Bram@...>:
                    > Jérémie Roquet wrote:
                    >> 2009/10/28 Bram Moolenaar <Bram@...>:
                    >> >> It adds "space" in the allowed "listchars" arguments.
                    >> > I'm not sure how useful it is to show something instead of a space.
                    >> > Isn't it obvious that there is a space when there is nothing?
                    >> Sometimes it's not : I'm using a visible character for the first
                    >> column of tabs, but an invisible one for the remaining columns.
                    >> So cases where a tab is followed by a space are not that obvious.
                    >> And as Steve pointed out, double spaces are not always obvious either.
                    > Well, I might consider including this.  Can you write a patch for the
                    > documentation as well?

                    Sure.

                    Here is what I supposed was to be updated; please let me know if there
                    is some other documentation to patch.

                    Best regards,

                    Index: runtime/doc/options.txt
                    ===================================================================
                    --- runtime/doc/options.txt (revision 1626)
                    +++ runtime/doc/options.txt (working copy)
                    @@ -4360,17 +4360,19 @@
                    visible in the first column.
                    nbsp:c Character to show for a non-breakable space (character
                    0xA0, 160). Left blank when omitted.
                    + space:c Character to show for a space (character 0x20, 32). Left
                    + blank when omitted.

                    The characters ':' and ',' should not be used. UTF-8 characters can
                    be used when 'encoding' is "utf-8", otherwise only printable
                    characters are allowed. All characters must be single width.

                    Examples: >
                    - :set lcs=tab:>-,trail:-
                    + :set lcs=tab:>-,trail:-,space:.
                    :set lcs=tab:>-,eol:<,nbsp:%
                    :set lcs=extends:>,precedes:<
                    < The "NonText" highlighting will be used for "eol", "extends" and
                    - "precedes". "SpecialKey" for "nbsp", "tab" and "trail".
                    + "precedes". "SpecialKey" for "nbsp", "space", "tab" and "trail".
                    |hl-NonText| |hl-SpecialKey|

                    *'lpl'* *'nolpl'* *'loadplugins'* *'noloadplugins'*

                    --
                    Jérémie Roquet - Arkanosis
                    Programming artist
                    Developer in natural language processing - Exalead

                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_dev" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • jpetrie
                    ... I know this thread is from 2009 and I hope I m not stomping on some kind of list etiquette by bringing it back to life, but I m wondering what happened to
                    Message 9 of 27 , Oct 5, 2011
                      > Jérémie Roquet wrote:
                      >> 2009/10/28 Bram Moolenaar <[hidden email]>:
                      >> >> It adds "space" in the allowed "listchars" arguments.
                      >> > I'm not sure how useful it is to show something instead of a space.
                      >> > Isn't it obvious that there is a space when there is nothing?
                      >> Sometimes it's not : I'm using a visible character for the first
                      >> column of tabs, but an invisible one for the remaining columns.
                      >> So cases where a tab is followed by a space are not that obvious.
                      >> And as Steve pointed out, double spaces are not always obvious either.
                      > Well, I might consider including this. Can you write a patch for the
                      > documentation as well?

                      I know this thread is from 2009 and I hope I'm not stomping on some kind of
                      list etiquette by bringing it back to life, but I'm wondering what happened
                      to this patch to enable a "space" option for listchars?

                      As far as I can tell it never made it in to the official code, as it doesn't
                      function in my version of gvim 7.3. I'd really like to have the option, so
                      I'm curious if the patch was never integrated as a design decision or if
                      there was something wrong with the code or documentation patch I could help
                      improve?

                      -- jmp

                      --
                      View this message in context: http://vim.1045645.n5.nabble.com/Patch-support-for-the-space-argument-for-listchars-tp1210494p4873477.html
                      Sent from the Vim - Dev mailing list archive at Nabble.com.

                      --
                      You received this message from the "vim_dev" maillist.
                      Do not top-post! Type your reply below the text you are replying to.
                      For more information, visit http://www.vim.org/maillist.php
                    • Christian Brabandt
                      Hi jpetrie! ... Can you point me to the patch? regards, Christian -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply
                      Message 10 of 27 , Oct 5, 2011
                        Hi jpetrie!

                        On Mi, 05 Okt 2011, jpetrie wrote:

                        > > Jérémie Roquet wrote:
                        > >> 2009/10/28 Bram Moolenaar <[hidden email]>:
                        > >> >> It adds "space" in the allowed "listchars" arguments.
                        > >> > I'm not sure how useful it is to show something instead of a space.
                        > >> > Isn't it obvious that there is a space when there is nothing?
                        > >> Sometimes it's not : I'm using a visible character for the first
                        > >> column of tabs, but an invisible one for the remaining columns.
                        > >> So cases where a tab is followed by a space are not that obvious.
                        > >> And as Steve pointed out, double spaces are not always obvious either.
                        > > Well, I might consider including this. Can you write a patch for the
                        > > documentation as well?
                        >
                        > I know this thread is from 2009 and I hope I'm not stomping on some kind of
                        > list etiquette by bringing it back to life, but I'm wondering what happened
                        > to this patch to enable a "space" option for listchars?
                        >
                        > As far as I can tell it never made it in to the official code, as it doesn't
                        > function in my version of gvim 7.3. I'd really like to have the option, so
                        > I'm curious if the patch was never integrated as a design decision or if
                        > there was something wrong with the code or documentation patch I could help
                        > improve?

                        Can you point me to the patch?

                        regards,
                        Christian
                        --

                        --
                        You received this message from the "vim_dev" maillist.
                        Do not top-post! Type your reply below the text you are replying to.
                        For more information, visit http://www.vim.org/maillist.php
                      • James Vega
                        ... It s in the todo list (c.f., :help todo). ... http://mid.gmane.org/19e866460910290309w275b07bhb8e7a5a5fdf69328@mail.gmail.com -- James GPG Key:
                        Message 11 of 27 , Oct 5, 2011
                          On Wed, Oct 05, 2011 at 11:07:44PM +0200, Christian Brabandt wrote:
                          > Hi jpetrie!
                          >
                          > On Mi, 05 Okt 2011, jpetrie wrote:
                          >
                          > > > Jérémie Roquet wrote:
                          > > >> 2009/10/28 Bram Moolenaar <[hidden email]>:
                          > > >> >> It adds "space" in the allowed "listchars" arguments.
                          > > >> > I'm not sure how useful it is to show something instead of a space.
                          > > >> > Isn't it obvious that there is a space when there is nothing?
                          > > >> Sometimes it's not : I'm using a visible character for the first
                          > > >> column of tabs, but an invisible one for the remaining columns.
                          > > >> So cases where a tab is followed by a space are not that obvious.
                          > > >> And as Steve pointed out, double spaces are not always obvious either.
                          > > > Well, I might consider including this. Can you write a patch for the
                          > > > documentation as well?
                          > >
                          > > I know this thread is from 2009 and I hope I'm not stomping on some kind of
                          > > list etiquette by bringing it back to life, but I'm wondering what happened
                          > > to this patch to enable a "space" option for listchars?

                          It's in the todo list (c.f., :help todo).

                          > Can you point me to the patch?

                          http://mid.gmane.org/19e866460910290309w275b07bhb8e7a5a5fdf69328@...

                          --
                          James
                          GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan@...>
                        • Christian Brabandt
                          Hi James! ... Thanks, applies, but needs some updates. Bram, would you like an updated patch, including documentation? regards, Christian -- Linux wird nie zum
                          Message 12 of 27 , Oct 6, 2011
                            Hi James!

                            On Mi, 05 Okt 2011, James Vega wrote:

                            > On Wed, Oct 05, 2011 at 11:07:44PM +0200, Christian Brabandt wrote:
                            > > Hi jpetrie!
                            > >
                            > > On Mi, 05 Okt 2011, jpetrie wrote:
                            > >
                            > > > > Jérémie Roquet wrote:
                            > > > >> 2009/10/28 Bram Moolenaar <[hidden email]>:
                            > > > >> >> It adds "space" in the allowed "listchars" arguments.
                            > > > >> > I'm not sure how useful it is to show something instead of a space.
                            > > > >> > Isn't it obvious that there is a space when there is nothing?
                            > > > >> Sometimes it's not : I'm using a visible character for the first
                            > > > >> column of tabs, but an invisible one for the remaining columns.
                            > > > >> So cases where a tab is followed by a space are not that obvious.
                            > > > >> And as Steve pointed out, double spaces are not always obvious either.
                            > > > > Well, I might consider including this. Can you write a patch for the
                            > > > > documentation as well?
                            > > >
                            > > > I know this thread is from 2009 and I hope I'm not stomping on some kind of
                            > > > list etiquette by bringing it back to life, but I'm wondering what happened
                            > > > to this patch to enable a "space" option for listchars?
                            >
                            > It's in the todo list (c.f., :help todo).
                            >
                            > > Can you point me to the patch?
                            >
                            > http://mid.gmane.org/19e866460910290309w275b07bhb8e7a5a5fdf69328@...
                            >

                            Thanks, applies, but needs some updates.
                            Bram, would you like an updated patch, including documentation?


                            regards,
                            Christian
                            --
                            Linux wird nie zum meistinstallierten System -
                            so oft wie man Windows neu installieren darf.

                            --
                            You received this message from the "vim_dev" maillist.
                            Do not top-post! Type your reply below the text you are replying to.
                            For more information, visit http://www.vim.org/maillist.php
                          • Bram Moolenaar
                            ... We already have enough options to completely confuse a beginning user. Every time a proposal is made to add another option or option value, the question
                            Message 13 of 27 , Oct 6, 2011
                              Christian Brabandt wrote:

                              > On Mi, 05 Okt 2011, James Vega wrote:
                              >
                              > > On Wed, Oct 05, 2011 at 11:07:44PM +0200, Christian Brabandt wrote:
                              > > > Hi jpetrie!
                              > > >
                              > > > On Mi, 05 Okt 2011, jpetrie wrote:
                              > > >
                              > > > > > Jérémie Roquet wrote:
                              > > > > >> 2009/10/28 Bram Moolenaar <[hidden email]>:
                              > > > > >> >> It adds "space" in the allowed "listchars" arguments.
                              > > > > >> > I'm not sure how useful it is to show something instead of a space.
                              > > > > >> > Isn't it obvious that there is a space when there is nothing?
                              > > > > >> Sometimes it's not : I'm using a visible character for the first
                              > > > > >> column of tabs, but an invisible one for the remaining columns.
                              > > > > >> So cases where a tab is followed by a space are not that obvious.
                              > > > > >> And as Steve pointed out, double spaces are not always obvious either.
                              > > > > > Well, I might consider including this. Can you write a patch for the
                              > > > > > documentation as well?
                              > > > >
                              > > > > I know this thread is from 2009 and I hope I'm not stomping on some kind of
                              > > > > list etiquette by bringing it back to life, but I'm wondering what happened
                              > > > > to this patch to enable a "space" option for listchars?
                              > >
                              > > It's in the todo list (c.f., :help todo).
                              > >
                              > > > Can you point me to the patch?
                              > >
                              > > http://mid.gmane.org/19e866460910290309w275b07bhb8e7a5a5fdf69328@...
                              > >
                              >
                              > Thanks, applies, but needs some updates.
                              > Bram, would you like an updated patch, including documentation?

                              We already have enough options to completely confuse a beginning user.
                              Every time a proposal is made to add another option or option value, the
                              question is: do we really need this? How many people would actually
                              use it? Isn't there another way to do almost the same?

                              You can at least use :match if you want to highlight specific use of
                              spaces.

                              I have been overwhelmed with bugs and bug fixes, these always go before
                              new features, especially when I'm not sure if it's a useful feature.
                              And also because new features tend to introduce new bugs that then have
                              to be fixed...

                              --
                              hundred-and-one symptoms of being an internet addict:
                              39. You move into a new house and decide to Netscape before you landscape.

                              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                              /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                              \\\ an exciting new programming language -- http://www.Zimbu.org ///
                              \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                              --
                              You received this message from the "vim_dev" maillist.
                              Do not top-post! Type your reply below the text you are replying to.
                              For more information, visit http://www.vim.org/maillist.php
                            • Ben Fritz
                              ... I think this one in particular could be useful. I was a bit surprised to see a way to show non-breaking space, tabs, trailing space, but not spaces in
                              Message 14 of 27 , Oct 6, 2011
                                On Oct 6, 4:21 pm, Bram Moolenaar <B...@...> wrote:
                                > Christian Brabandt wrote:
                                > > On Mi, 05 Okt 2011, James Vega wrote:
                                >
                                > > > On Wed, Oct 05, 2011 at 11:07:44PM +0200, Christian Brabandt wrote:
                                > > > > Hi jpetrie!
                                >
                                > > > > On Mi, 05 Okt 2011, jpetrie wrote:
                                >
                                > > > > > > J r mie Roquet wrote:
                                > > > > > >> 2009/10/28 Bram Moolenaar <[hidden email]>:
                                > > > > > >> >> It adds "space" in the allowed "listchars" arguments.
                                > > > > > >> > I'm not sure how useful it is to show something instead of a space.
                                > > > > > >> > Isn't it obvious that there is a space when there is nothing?
                                > > > > > >> Sometimes it's not : I'm using a visible character for the first
                                > > > > > >> column of tabs, but an invisible one for the remaining columns.
                                > > > > > >> So cases where a tab is followed by a space are not that obvious.
                                > > > > > >> And as Steve pointed out, double spaces are not always obvious either.
                                > > > > > > Well, I might consider including this.  Can you write a patch for the
                                > > > > > > documentation as well?
                                >
                                > > > > > I know this thread is from 2009 and I hope I'm not stomping on some kind of
                                > > > > > list etiquette by bringing it back to life, but I'm wondering what happened
                                > > > > > to this patch to enable a "space" option for listchars?
                                >
                                > > > It's in the todo list (c.f., :help todo).
                                >
                                > > > > Can you point me to the patch?
                                >
                                > > > http://mid.gmane.org/19e866460910290309w275b07bhb8e7a5a5fdf69...@...
                                >
                                > > Thanks, applies, but needs some updates.
                                > > Bram, would you like an updated patch, including documentation?
                                >
                                > We already have enough options to completely confuse a beginning user.
                                > Every time a proposal is made to add another option or option value, the
                                > question is: do we really need this?  How many people would actually
                                > use it?  Isn't there another way to do almost the same?
                                >

                                I think this one in particular could be useful. I was a bit surprised
                                to see a way to show non-breaking space, tabs, trailing space, but not
                                spaces in general.

                                > You can at least use :match if you want to highlight specific use of
                                > spaces.
                                >

                                One use I could see would be to make it easier to see the number of
                                spaces. :match wouldn't let you do this. Or easier to see specific
                                differences in diff view. Steve Hall also listed a few other reasons
                                in the initial set of posts:

                                * other non-printing characters that look like dec 032
                                * double spaces
                                * spaces after chars at window edges with wrap on
                                * every char as a byte

                                > I have been overwhelmed with bugs and bug fixes, these always go before
                                > new features, especially when I'm not sure if it's a useful feature.
                                > And also because new features tend to introduce new bugs that then have
                                > to be fixed...
                                >

                                I agree, bugfixes first makes sense :-)

                                --
                                You received this message from the "vim_dev" maillist.
                                Do not top-post! Type your reply below the text you are replying to.
                                For more information, visit http://www.vim.org/maillist.php
                              • 柳永峰
                                hi thanks,it s very useful to me ... -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying
                                Message 15 of 27 , Aug 27, 2012
                                  hi thanks,it's very useful to me
                                  On Wednesday, October 21, 2009 10:26:10 PM UTC+8, Arkanosis wrote:
                                  > Hello,
                                  >
                                  > I've just started to use Vim, and missed the possibility to display
                                  > middle-dots (or any other visible character) instead of spaces, so I
                                  > made the following patch.
                                  > It adds "space" in the allowed "listchars" arguments.
                                  >
                                  > Just in case someone find this useful ; I found easier to patch Vim
                                  > than to look for another existing solution ;-)
                                  >
                                  > Best regards,
                                  >
                                  > Index: option.c
                                  > ===================================================================
                                  > --- option.c (revision 1626)
                                  > +++ option.c (working copy)
                                  > @@ -6847,6 +6847,7 @@
                                  > {&lcs_ext, "extends"},
                                  > {&lcs_nbsp, "nbsp"},
                                  > {&lcs_prec, "precedes"},
                                  > + {&lcs_space, "space"},
                                  > {&lcs_tab2, "tab"},
                                  > {&lcs_trail, "trail"},
                                  > };
                                  > Index: screen.c
                                  > ===================================================================
                                  > --- screen.c (revision 1626)
                                  > +++ screen.c (working copy)
                                  > @@ -3886,6 +3886,18 @@
                                  > #endif
                                  > }
                                  >
                                  > + /* 'list' : change space to lcs_space. */
                                  > + if (wp->w_p_list && c == ' ' && lcs_space)
                                  > + {
                                  > + c = lcs_space;
                                  > + if (area_attr == 0 && search_attr == 0)
                                  > + {
                                  > + n_attr = 1;
                                  > + extra_attr = hl_attr(HLF_8);
                                  > + saved_attr2 = char_attr; /* save current attr */
                                  > + }
                                  > + }
                                  > +
                                  > if (extra_check)
                                  > {
                                  > #ifdef FEAT_SPELL
                                  > @@ -4040,7 +4052,7 @@
                                  > }
                                  > #endif
                                  >
                                  > - if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
                                  > + if (trailcol != MAXCOL && ptr > line + trailcol && (c == ' ' || c
                                  > == lcs_space))
                                  > {
                                  > c = lcs_trail;
                                  > if (!attr_pri)
                                  > Index: globals.h
                                  > ===================================================================
                                  > --- globals.h (revision 1626)
                                  > +++ globals.h (working copy)
                                  > @@ -1146,6 +1146,7 @@
                                  > EXTERN int lcs_tab1 INIT(= NUL);
                                  > EXTERN int lcs_tab2 INIT(= NUL);
                                  > EXTERN int lcs_trail INIT(= NUL);
                                  > +EXTERN int lcs_space INIT(= NUL);
                                  >
                                  > #if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT) \
                                  > || defined(FEAT_FOLDING)
                                  >
                                  > --
                                  > Jérémie Roquet - Arkanosis
                                  > Programming artist
                                  > Developer in natural language processing - Exalead

                                  --
                                  You received this message from the "vim_dev" maillist.
                                  Do not top-post! Type your reply below the text you are replying to.
                                  For more information, visit http://www.vim.org/maillist.php
                                • Jesus Antonio Santos Giraldo
                                  ... That would be very useful for me! I m developing a plaint text file now and was very excited while reading how listchars works specially the trail option.
                                  Message 16 of 27 , Aug 31, 2012
                                    El lunes, 27 de agosto de 2012 05:59:48 UTC-5, 柳永峰 escribió:
                                    > hi thanks,it's very useful to me
                                    >
                                    > On Wednesday, October 21, 2009 10:26:10 PM UTC+8, Arkanosis wrote:
                                    >
                                    > > Hello,
                                    >
                                    > >
                                    >
                                    > > I've just started to use Vim, and missed the possibility to display
                                    >
                                    > > middle-dots (or any other visible character) instead of spaces, so I
                                    >
                                    > > made the following patch.
                                    >
                                    > > It adds "space" in the allowed "listchars" arguments.
                                    >
                                    > >
                                    >
                                    > > Just in case someone find this useful ; I found easier to patch Vim
                                    >
                                    > > than to look for another existing solution ;-)
                                    >
                                    > >
                                    >
                                    > > Best regards,
                                    >
                                    > >
                                    >
                                    > > Index: option.c
                                    >
                                    > > ===================================================================
                                    >
                                    > > --- option.c (revision 1626)
                                    >
                                    > > +++ option.c (working copy)
                                    >
                                    > > @@ -6847,6 +6847,7 @@
                                    >
                                    > > {&lcs_ext, "extends"},
                                    >
                                    > > {&lcs_nbsp, "nbsp"},
                                    >
                                    > > {&lcs_prec, "precedes"},
                                    >
                                    > > + {&lcs_space, "space"},
                                    >
                                    > > {&lcs_tab2, "tab"},
                                    >
                                    > > {&lcs_trail, "trail"},
                                    >
                                    > > };
                                    >
                                    > > Index: screen.c
                                    >
                                    > > ===================================================================
                                    >
                                    > > --- screen.c (revision 1626)
                                    >
                                    > > +++ screen.c (working copy)
                                    >
                                    > > @@ -3886,6 +3886,18 @@
                                    >
                                    > > #endif
                                    >
                                    > > }
                                    >
                                    > >
                                    >
                                    > > + /* 'list' : change space to lcs_space. */
                                    >
                                    > > + if (wp->w_p_list && c == ' ' && lcs_space)
                                    >
                                    > > + {
                                    >
                                    > > + c = lcs_space;
                                    >
                                    > > + if (area_attr == 0 && search_attr == 0)
                                    >
                                    > > + {
                                    >
                                    > > + n_attr = 1;
                                    >
                                    > > + extra_attr = hl_attr(HLF_8);
                                    >
                                    > > + saved_attr2 = char_attr; /* save current attr */
                                    >
                                    > > + }
                                    >
                                    > > + }
                                    >
                                    > > +
                                    >
                                    > > if (extra_check)
                                    >
                                    > > {
                                    >
                                    > > #ifdef FEAT_SPELL
                                    >
                                    > > @@ -4040,7 +4052,7 @@
                                    >
                                    > > }
                                    >
                                    > > #endif
                                    >
                                    > >
                                    >
                                    > > - if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
                                    >
                                    > > + if (trailcol != MAXCOL && ptr > line + trailcol && (c == ' ' || c
                                    >
                                    > > == lcs_space))
                                    >
                                    > > {
                                    >
                                    > > c = lcs_trail;
                                    >
                                    > > if (!attr_pri)
                                    >
                                    > > Index: globals.h
                                    >
                                    > > ===================================================================
                                    >
                                    > > --- globals.h (revision 1626)
                                    >
                                    > > +++ globals.h (working copy)
                                    >
                                    > > @@ -1146,6 +1146,7 @@
                                    >
                                    > > EXTERN int lcs_tab1 INIT(= NUL);
                                    >
                                    > > EXTERN int lcs_tab2 INIT(= NUL);
                                    >
                                    > > EXTERN int lcs_trail INIT(= NUL);
                                    >
                                    > > +EXTERN int lcs_space INIT(= NUL);
                                    >
                                    > >
                                    >
                                    > > #if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT) \
                                    >
                                    > > || defined(FEAT_FOLDING)
                                    >
                                    > >
                                    >
                                    > > --
                                    >
                                    > > Jérémie Roquet - Arkanosis
                                    >
                                    > > Programming artist
                                    >
                                    > > Developer in natural language processing - Exalead

                                    That would be very useful for me!

                                    I'm developing a plaint text file now and was very excited while reading how listchars works specially the trail option. However almost immediately I find myself googling the way to convert middle-dots... until I found this thread.

                                    So, really, I can see real benefits from having this, besides looking the patch it seems not so difficult to merge or maintain... ( Things are easier to do if you don't have to do them yourself ;) )

                                    If you ever consider the possibility of including this count me on to test it.


                                    J.

                                    --
                                    You received this message from the "vim_dev" maillist.
                                    Do not top-post! Type your reply below the text you are replying to.
                                    For more information, visit http://www.vim.org/maillist.php
                                  • Jesus Antonio Santos Giraldo
                                    Almost a year later since last comment, Vim 7.4 is out... and again there is no *space* option for listchars... :( :( :( Maybe anyone has implemented this
                                    Message 17 of 27 , Aug 18, 2013
                                      Almost a year later since last comment, Vim 7.4 is out... and again there is no *space* option for listchars... :( :( :(

                                      Maybe anyone has implemented this patch in 7.4? If so, I really appreciate it.
                                      As I said a year ago, "It would be very, very, very usefull for my work".


                                      J.

                                      El viernes, 31 de agosto de 2012 17:34:16 UTC-5, Jesus Antonio Santos Giraldo escribió:
                                      > El lunes, 27 de agosto de 2012 05:59:48 UTC-5, 柳永峰 escribió:
                                      >
                                      > > hi thanks,it's very useful to me
                                      >
                                      > >
                                      >
                                      > > On Wednesday, October 21, 2009 10:26:10 PM UTC+8, Arkanosis wrote:
                                      >
                                      > >
                                      >
                                      > > > Hello,
                                      >
                                      > >
                                      >
                                      > > >
                                      >
                                      > >
                                      >
                                      > > > I've just started to use Vim, and missed the possibility to display
                                      >
                                      > >
                                      >
                                      > > > middle-dots (or any other visible character) instead of spaces, so I
                                      >
                                      > >
                                      >
                                      > > > made the following patch.
                                      >
                                      > >
                                      >
                                      > > > It adds "space" in the allowed "listchars" arguments.
                                      >
                                      > >
                                      >
                                      > > >
                                      >
                                      > >
                                      >
                                      > > > Just in case someone find this useful ; I found easier to patch Vim
                                      >
                                      > >
                                      >
                                      > > > than to look for another existing solution ;-)
                                      >
                                      > >
                                      >
                                      > > >
                                      >
                                      > >
                                      >
                                      > > > Best regards,
                                      >
                                      > >
                                      >
                                      > > >
                                      >
                                      > >
                                      >
                                      > > > Index: option.c
                                      >
                                      > >
                                      >
                                      > > > ===================================================================
                                      >
                                      > >
                                      >
                                      > > > --- option.c (revision 1626)
                                      >
                                      > >
                                      >
                                      > > > +++ option.c (working copy)
                                      >
                                      > >
                                      >
                                      > > > @@ -6847,6 +6847,7 @@
                                      >
                                      > >
                                      >
                                      > > > {&lcs_ext, "extends"},
                                      >
                                      > >
                                      >
                                      > > > {&lcs_nbsp, "nbsp"},
                                      >
                                      > >
                                      >
                                      > > > {&lcs_prec, "precedes"},
                                      >
                                      > >
                                      >
                                      > > > + {&lcs_space, "space"},
                                      >
                                      > >
                                      >
                                      > > > {&lcs_tab2, "tab"},
                                      >
                                      > >
                                      >
                                      > > > {&lcs_trail, "trail"},
                                      >
                                      > >
                                      >
                                      > > > };
                                      >
                                      > >
                                      >
                                      > > > Index: screen.c
                                      >
                                      > >
                                      >
                                      > > > ===================================================================
                                      >
                                      > >
                                      >
                                      > > > --- screen.c (revision 1626)
                                      >
                                      > >
                                      >
                                      > > > +++ screen.c (working copy)
                                      >
                                      > >
                                      >
                                      > > > @@ -3886,6 +3886,18 @@
                                      >
                                      > >
                                      >
                                      > > > #endif
                                      >
                                      > >
                                      >
                                      > > > }
                                      >
                                      > >
                                      >
                                      > > >
                                      >
                                      > >
                                      >
                                      > > > + /* 'list' : change space to lcs_space. */
                                      >
                                      > >
                                      >
                                      > > > + if (wp->w_p_list && c == ' ' && lcs_space)
                                      >
                                      > >
                                      >
                                      > > > + {
                                      >
                                      > >
                                      >
                                      > > > + c = lcs_space;
                                      >
                                      > >
                                      >
                                      > > > + if (area_attr == 0 && search_attr == 0)
                                      >
                                      > >
                                      >
                                      > > > + {
                                      >
                                      > >
                                      >
                                      > > > + n_attr = 1;
                                      >
                                      > >
                                      >
                                      > > > + extra_attr = hl_attr(HLF_8);
                                      >
                                      > >
                                      >
                                      > > > + saved_attr2 = char_attr; /* save current attr */
                                      >
                                      > >
                                      >
                                      > > > + }
                                      >
                                      > >
                                      >
                                      > > > + }
                                      >
                                      > >
                                      >
                                      > > > +
                                      >
                                      > >
                                      >
                                      > > > if (extra_check)
                                      >
                                      > >
                                      >
                                      > > > {
                                      >
                                      > >
                                      >
                                      > > > #ifdef FEAT_SPELL
                                      >
                                      > >
                                      >
                                      > > > @@ -4040,7 +4052,7 @@
                                      >
                                      > >
                                      >
                                      > > > }
                                      >
                                      > >
                                      >
                                      > > > #endif
                                      >
                                      > >
                                      >
                                      > > >
                                      >
                                      > >
                                      >
                                      > > > - if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
                                      >
                                      > >
                                      >
                                      > > > + if (trailcol != MAXCOL && ptr > line + trailcol && (c == ' ' || c
                                      >
                                      > >
                                      >
                                      > > > == lcs_space))
                                      >
                                      > >
                                      >
                                      > > > {
                                      >
                                      > >
                                      >
                                      > > > c = lcs_trail;
                                      >
                                      > >
                                      >
                                      > > > if (!attr_pri)
                                      >
                                      > >
                                      >
                                      > > > Index: globals.h
                                      >
                                      > >
                                      >
                                      > > > ===================================================================
                                      >
                                      > >
                                      >
                                      > > > --- globals.h (revision 1626)
                                      >
                                      > >
                                      >
                                      > > > +++ globals.h (working copy)
                                      >
                                      > >
                                      >
                                      > > > @@ -1146,6 +1146,7 @@
                                      >
                                      > >
                                      >
                                      > > > EXTERN int lcs_tab1 INIT(= NUL);
                                      >
                                      > >
                                      >
                                      > > > EXTERN int lcs_tab2 INIT(= NUL);
                                      >
                                      > >
                                      >
                                      > > > EXTERN int lcs_trail INIT(= NUL);
                                      >
                                      > >
                                      >
                                      > > > +EXTERN int lcs_space INIT(= NUL);
                                      >
                                      > >
                                      >
                                      > > >
                                      >
                                      > >
                                      >
                                      > > > #if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT) \
                                      >
                                      > >
                                      >
                                      > > > || defined(FEAT_FOLDING)
                                      >
                                      > >
                                      >
                                      > > >
                                      >
                                      > >
                                      >
                                      > > > --
                                      >
                                      > >
                                      >
                                      > > > Jérémie Roquet - Arkanosis
                                      >
                                      > >
                                      >
                                      > > > Programming artist
                                      >
                                      > >
                                      >
                                      > > > Developer in natural language processing - Exalead
                                      >
                                      >
                                      >
                                      > That would be very useful for me!
                                      >
                                      >
                                      >
                                      > I'm developing a plaint text file now and was very excited while reading how listchars works specially the trail option. However almost immediately I find myself googling the way to convert middle-dots... until I found this thread.
                                      >
                                      >
                                      >
                                      > So, really, I can see real benefits from having this, besides looking the patch it seems not so difficult to merge or maintain... ( Things are easier to do if you don't have to do them yourself ;) )
                                      >
                                      >
                                      >
                                      > If you ever consider the possibility of including this count me on to test it.
                                      >
                                      >
                                      >
                                      >
                                      >
                                      > J.

                                      --
                                      --
                                      You received this message from the "vim_dev" maillist.
                                      Do not top-post! Type your reply below the text you are replying to.
                                      For more information, visit http://www.vim.org/maillist.php

                                      ---
                                      You received this message because you are subscribed to the Google Groups "vim_dev" group.
                                      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                                      For more options, visit https://groups.google.com/groups/opt_out.
                                    • Steve Hall
                                      On Sun, Aug 18, 2013 at 6:41 PM, Jesus Antonio Santos Giraldo
                                      Message 18 of 27 , Aug 18, 2013
                                        On Sun, Aug 18, 2013 at 6:41 PM, Jesus Antonio Santos Giraldo <jeansagi@...> wrote:
                                        >
                                        > Almost a year later since last comment, Vim 7.4 is out... and again
                                        > there is no *space* option for listchars... :( :( :(

                                        Hear, hear. My only deficiency in Vim these days. (Other than expanded
                                        OS widgets of course, and who has time for that? :)


                                        -- 
                                        Steve Hall  [ digitect dancingpaper com ]
                                        OsterlundHall Architects  [ http://osterlundhall.com  ]

                                        --
                                        --
                                        You received this message from the "vim_dev" maillist.
                                        Do not top-post! Type your reply below the text you are replying to.
                                        For more information, visit http://www.vim.org/maillist.php
                                         
                                        ---
                                        You received this message because you are subscribed to the Google Groups "vim_dev" group.
                                        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                                        For more options, visit https://groups.google.com/groups/opt_out.
                                      • Jesus Antonio Santos Giraldo
                                        Not to mention that there is already a patch for it... :( J. 2013/8/18 Steve Hall ... -- -- You received this message from the
                                        Message 19 of 27 , Aug 18, 2013
                                          Not to mention that there is already a patch for it... :(


                                          J.


                                          2013/8/18 Steve Hall <digitect@...>
                                          On Sun, Aug 18, 2013 at 6:41 PM, Jesus Antonio Santos Giraldo <jeansagi@...> wrote:
                                          >
                                          > Almost a year later since last comment, Vim 7.4 is out... and again
                                          > there is no *space* option for listchars... :( :( :(

                                          Hear, hear. My only deficiency in Vim these days. (Other than expanded
                                          OS widgets of course, and who has time for that? :)


                                          -- 
                                          Steve Hall  [ digitect dancingpaper com ]
                                          OsterlundHall Architects  [ http://osterlundhall.com  ]

                                          --
                                          --
                                          You received this message from the "vim_dev" maillist.
                                          Do not top-post! Type your reply below the text you are replying to.
                                          For more information, visit http://www.vim.org/maillist.php
                                           
                                          ---
                                          You received this message because you are subscribed to a topic in the Google Groups "vim_dev" group.
                                          To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_dev/dIQHjW1g92s/unsubscribe.
                                          To unsubscribe from this group and all its topics, send an email to vim_dev+unsubscribe@....
                                          For more options, visit https://groups.google.com/groups/opt_out.

                                          --
                                          --
                                          You received this message from the "vim_dev" maillist.
                                          Do not top-post! Type your reply below the text you are replying to.
                                          For more information, visit http://www.vim.org/maillist.php
                                           
                                          ---
                                          You received this message because you are subscribed to the Google Groups "vim_dev" group.
                                          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                                          For more options, visit https://groups.google.com/groups/opt_out.
                                        • Christian Brabandt
                                          Hi Jesus! ... All whitespace as something different? Can t you use the conceal feature for that? ... regards, Christian -- Sprachlexikon-Namen: NICOLE - immer
                                          Message 20 of 27 , Aug 19, 2013
                                            Hi Jesus!

                                            On So, 18 Aug 2013, Jesus Antonio Santos Giraldo wrote:

                                            > Not to mention that there is already a patch for it... :(

                                            All whitespace as something different? Can't you use the conceal feature
                                            for that?

                                            :syn match MyWhitespace /\s/ conceal cchar=_ containedin=ALL
                                            :setl conceallevel=2 concealcursor=nv

                                            regards,
                                            Christian
                                            --
                                            Sprachlexikon-Namen: NICOLE - immer pleite

                                            --
                                            --
                                            You received this message from the "vim_dev" maillist.
                                            Do not top-post! Type your reply below the text you are replying to.
                                            For more information, visit http://www.vim.org/maillist.php

                                            ---
                                            You received this message because you are subscribed to the Google Groups "vim_dev" group.
                                            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                                            For more options, visit https://groups.google.com/groups/opt_out.
                                          • glts
                                            On Mon, Aug 19, 2013 at 12:41 AM, Jesus Antonio Santos Giraldo ... +1 I didn t know this patch existed. This is a common gripe, especially for people coming
                                            Message 21 of 27 , Aug 19, 2013
                                              On Mon, Aug 19, 2013 at 12:41 AM, Jesus Antonio Santos Giraldo
                                              <jeansagi@...> wrote:
                                              > Almost a year later since last comment, Vim 7.4 is out... and again there is no *space* option for listchars... :( :( :(
                                              >
                                              > Maybe anyone has implemented this patch in 7.4? If so, I really appreciate it.
                                              > As I said a year ago, "It would be very, very, very usefull for my work".
                                              >
                                              >
                                              > J.
                                              >
                                              > El viernes, 31 de agosto de 2012 17:34:16 UTC-5, Jesus Antonio Santos Giraldo escribió:
                                              >> El lunes, 27 de agosto de 2012 05:59:48 UTC-5, 柳永峰 escribió:
                                              >> > hi thanks,it's very useful to me
                                              >> >
                                              >> > On Wednesday, October 21, 2009 10:26:10 PM UTC+8, Arkanosis wrote:
                                              >> > > Hello,
                                              >> > >
                                              >> > > I've just started to use Vim, and missed the possibility to display
                                              >> > > middle-dots (or any other visible character) instead of spaces, so I
                                              >> > > made the following patch.
                                              >> > > It adds "space" in the allowed "listchars" arguments.
                                              >> > >
                                              >> > > Just in case someone find this useful ; I found easier to patch Vim
                                              >> > > than to look for another existing solution ;-)
                                              >> > >
                                              >> > > Best regards,
                                              >> > >
                                              >> > > Index: option.c
                                              >> > > ===================================================================
                                              >> > > --- option.c (revision 1626)
                                              >> > > +++ option.c (working copy)
                                              >> > > @@ -6847,6 +6847,7 @@
                                              >> > > {&lcs_ext, "extends"},
                                              >> > > {&lcs_nbsp, "nbsp"},
                                              >> > > {&lcs_prec, "precedes"},
                                              >> > > + {&lcs_space, "space"},
                                              >> > > {&lcs_tab2, "tab"},
                                              >> > > {&lcs_trail, "trail"},
                                              >> > > };
                                              >> > > Index: screen.c
                                              >> > > ===================================================================
                                              >> > > --- screen.c (revision 1626)
                                              >> > > +++ screen.c (working copy)
                                              >> > > @@ -3886,6 +3886,18 @@
                                              >> > > #endif
                                              >> > > }
                                              >> > >
                                              >> > > + /* 'list' : change space to lcs_space. */
                                              >> > > + if (wp->w_p_list && c == ' ' && lcs_space)
                                              >> > > + {
                                              >> > > + c = lcs_space;
                                              >> > > + if (area_attr == 0 && search_attr == 0)
                                              >> > > + {
                                              >> > > + n_attr = 1;
                                              >> > > + extra_attr = hl_attr(HLF_8);
                                              >> > > + saved_attr2 = char_attr; /* save current attr */
                                              >> > > + }
                                              >> > > + }
                                              >> > > +
                                              >> > > if (extra_check)
                                              >> > > {
                                              >> > > #ifdef FEAT_SPELL
                                              >> > > @@ -4040,7 +4052,7 @@
                                              >> > > }
                                              >> > > #endif
                                              >> > >
                                              >> > > - if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
                                              >> > > + if (trailcol != MAXCOL && ptr > line + trailcol && (c == ' ' || c
                                              >> > > == lcs_space))
                                              >> > > {
                                              >> > > c = lcs_trail;
                                              >> > > if (!attr_pri)
                                              >> > > Index: globals.h
                                              >> > > ===================================================================
                                              >> > > --- globals.h (revision 1626)
                                              >> > > +++ globals.h (working copy)
                                              >> > > @@ -1146,6 +1146,7 @@
                                              >> > > EXTERN int lcs_tab1 INIT(= NUL);
                                              >> > > EXTERN int lcs_tab2 INIT(= NUL);
                                              >> > > EXTERN int lcs_trail INIT(= NUL);
                                              >> > > +EXTERN int lcs_space INIT(= NUL);
                                              >> > >
                                              >> > > #if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT) \
                                              >> > > || defined(FEAT_FOLDING)
                                              >> > >
                                              >> > > --
                                              >> > > Jérémie Roquet - Arkanosis
                                              >> > > Programming artist
                                              >> > > Developer in natural language processing - Exalead
                                              >>
                                              >> That would be very useful for me!
                                              >>
                                              >>
                                              >>
                                              >> I'm developing a plaint text file now and was very excited while reading how listchars works specially the trail option. However almost immediately I find myself googling the way to convert middle-dots... until I found this thread.
                                              >>
                                              >>
                                              >>
                                              >> So, really, I can see real benefits from having this, besides looking the patch it seems not so difficult to merge or maintain... ( Things are easier to do if you don't have to do them yourself ;) )
                                              >>
                                              >>
                                              >>
                                              >> If you ever consider the possibility of including this count me on to test it.

                                              +1

                                              I didn't know this patch existed. This is a common gripe, especially for
                                              people coming from other editors. I mean, if even Microsoft Word can
                                              show space characters ... :P

                                              There's a popular Stackoverflow thread about this:
                                              http://stackoverflow.com/q/1675688

                                              --
                                              --
                                              You received this message from the "vim_dev" maillist.
                                              Do not top-post! Type your reply below the text you are replying to.
                                              For more information, visit http://www.vim.org/maillist.php

                                              ---
                                              You received this message because you are subscribed to the Google Groups "vim_dev" group.
                                              To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                                              For more options, visit https://groups.google.com/groups/opt_out.
                                            • Jesus Antonio Santos Giraldo
                                              je je... I mean, if even Microsoft Word can show space characters ... nice catch ! Interesting link on stackoverflow BTW. J. 2013/8/19 glts
                                              Message 22 of 27 , Aug 19, 2013
                                                je je... "I mean, if even Microsoft Word can show space characters"... nice catch !

                                                Interesting link on stackoverflow BTW.


                                                J.


                                                2013/8/19 glts <676c7473@...>
                                                On Mon, Aug 19, 2013 at 12:41 AM, Jesus Antonio Santos Giraldo
                                                <jeansagi@...> wrote:
                                                > Almost a year later since last comment, Vim 7.4 is out... and again there is no *space* option for listchars... :( :( :(
                                                >
                                                > Maybe anyone has implemented this patch in 7.4? If so, I really appreciate it.
                                                > As I said a year ago, "It would be very, very, very usefull for my work".
                                                >
                                                >
                                                > J.
                                                >
                                                > El viernes, 31 de agosto de 2012 17:34:16 UTC-5, Jesus Antonio Santos Giraldo escribió:
                                                >> El lunes, 27 de agosto de 2012 05:59:48 UTC-5, 柳永峰 escribió:
                                                >> > hi thanks,it's very useful to me
                                                >> >
                                                >> > On Wednesday, October 21, 2009 10:26:10 PM UTC+8, Arkanosis wrote:
                                                >> > > Hello,
                                                >> > >
                                                >> > > I've just started to use Vim, and missed the possibility to display
                                                >> > > middle-dots (or any other visible character) instead of spaces, so I
                                                >> > > made the following patch.
                                                >> > > It adds "space" in the allowed "listchars" arguments.
                                                >> > >
                                                >> > > Just in case someone find this useful ; I found easier to patch Vim
                                                >> > > than to look for another existing solution ;-)
                                                >> > >
                                                >> > > Best regards,
                                                >> > >
                                                >> > > Index: option.c
                                                >> > > ===================================================================
                                                >> > > --- option.c      (revision 1626)
                                                >> > > +++ option.c      (working copy)
                                                >> > > @@ -6847,6 +6847,7 @@
                                                >> > >   {&lcs_ext,      "extends"},
                                                >> > >   {&lcs_nbsp,     "nbsp"},
                                                >> > >   {&lcs_prec,     "precedes"},
                                                >> > > + {&lcs_space,    "space"},
                                                >> > >   {&lcs_tab2,     "tab"},
                                                >> > >   {&lcs_trail,    "trail"},
                                                >> > >      };
                                                >> > > Index: screen.c
                                                >> > > ===================================================================
                                                >> > > --- screen.c      (revision 1626)
                                                >> > > +++ screen.c      (working copy)
                                                >> > > @@ -3886,6 +3886,18 @@
                                                >> > >  #endif
                                                >> > >       }
                                                >> > >
                                                >> > > +     /* 'list' : change space to lcs_space. */
                                                >> > > +     if (wp->w_p_list && c == ' ' && lcs_space)
                                                >> > > +     {
                                                >> > > +         c = lcs_space;
                                                >> > > +         if (area_attr == 0 && search_attr == 0)
                                                >> > > +         {
                                                >> > > +             n_attr = 1;
                                                >> > > +             extra_attr = hl_attr(HLF_8);
                                                >> > > +             saved_attr2 = char_attr; /* save current attr */
                                                >> > > +         }
                                                >> > > +     }
                                                >> > > +
                                                >> > >       if (extra_check)
                                                >> > >       {
                                                >> > >  #ifdef FEAT_SPELL
                                                >> > > @@ -4040,7 +4052,7 @@
                                                >> > >           }
                                                >> > >  #endif
                                                >> > >
                                                >> > > -         if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
                                                >> > > +         if (trailcol != MAXCOL && ptr > line + trailcol && (c == ' ' || c
                                                >> > > == lcs_space))
                                                >> > >           {
                                                >> > >               c = lcs_trail;
                                                >> > >               if (!attr_pri)
                                                >> > > Index: globals.h
                                                >> > > ===================================================================
                                                >> > > --- globals.h     (revision 1626)
                                                >> > > +++ globals.h     (working copy)
                                                >> > > @@ -1146,6 +1146,7 @@
                                                >> > >  EXTERN int       lcs_tab1 INIT(= NUL);
                                                >> > >  EXTERN int       lcs_tab2 INIT(= NUL);
                                                >> > >  EXTERN int       lcs_trail INIT(= NUL);
                                                >> > > +EXTERN int       lcs_space INIT(= NUL);
                                                >> > >
                                                >> > >  #if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT) \
                                                >> > >   || defined(FEAT_FOLDING)
                                                >> > >
                                                >> > > --
                                                >> > > Jérémie Roquet - Arkanosis
                                                >> > > Programming artist
                                                >> > > Developer in natural language processing - Exalead
                                                >>
                                                >> That would be very useful for me!
                                                >>
                                                >>
                                                >>
                                                >> I'm developing a plaint text file now and was very excited while reading how listchars works specially the trail option. However almost immediately I find myself googling the way to convert middle-dots... until I found this thread.
                                                >>
                                                >>
                                                >>
                                                >> So, really, I can see real benefits from having this, besides looking the patch it seems not so difficult to merge or maintain... ( Things are easier to do if you don't have to do them yourself ;) )
                                                >>
                                                >>
                                                >>
                                                >> If you ever consider the possibility of including this count me on to test it.

                                                +1

                                                I didn't know this patch existed. This is a common gripe, especially for
                                                people coming from other editors. I mean, if even Microsoft Word can
                                                show space characters ... :P

                                                There's a popular Stackoverflow thread about this:
                                                http://stackoverflow.com/q/1675688

                                                --
                                                --
                                                You received this message from the "vim_dev" maillist.
                                                Do not top-post! Type your reply below the text you are replying to.
                                                For more information, visit http://www.vim.org/maillist.php

                                                ---
                                                You received this message because you are subscribed to a topic in the Google Groups "vim_dev" group.
                                                To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_dev/dIQHjW1g92s/unsubscribe.
                                                To unsubscribe from this group and all its topics, send an email to vim_dev+unsubscribe@....
                                                For more options, visit https://groups.google.com/groups/opt_out.

                                                --
                                                --
                                                You received this message from the "vim_dev" maillist.
                                                Do not top-post! Type your reply below the text you are replying to.
                                                For more information, visit http://www.vim.org/maillist.php
                                                 
                                                ---
                                                You received this message because you are subscribed to the Google Groups "vim_dev" group.
                                                To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                                                For more options, visit https://groups.google.com/groups/opt_out.
                                              • Jesus Antonio Santos Giraldo
                                                Good one. Didn t knew about _concealing_ but so far it looks like the best approach to show spaces that I ve seen. In my case I wanted to conceal a pure space
                                                Message 23 of 27 , Aug 19, 2013
                                                  Good one.

                                                  Didn't knew about _concealing_ but so far it looks like the best approach to show spaces that I've seen.
                                                  In my case I wanted to conceal a pure space (0x32) not all whitespaces so I changed /\s/ with just a / /, otherwise tabulators and spaces would be concealed the same way.

                                                  Anyway for me *listchars* seems like the way it should be .


                                                  J.


                                                  2013/8/19 Christian Brabandt <cblists@...>
                                                  Hi Jesus!

                                                  On So, 18 Aug 2013, Jesus Antonio Santos Giraldo wrote:

                                                  > Not to mention that there is already a patch for it... :(

                                                  All whitespace as something different? Can't you use the conceal feature
                                                  for that?

                                                  :syn match MyWhitespace /\s/ conceal cchar=_ containedin=ALL
                                                  :setl conceallevel=2 concealcursor=nv

                                                  regards,
                                                  Christian
                                                  --
                                                  Sprachlexikon-Namen: NICOLE - immer pleite

                                                  --
                                                  --
                                                  You received this message from the "vim_dev" maillist.
                                                  Do not top-post! Type your reply below the text you are replying to.
                                                  For more information, visit http://www.vim.org/maillist.php

                                                  ---
                                                  You received this message because you are subscribed to a topic in the Google Groups "vim_dev" group.
                                                  To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_dev/dIQHjW1g92s/unsubscribe.
                                                  To unsubscribe from this group and all its topics, send an email to vim_dev+unsubscribe@....
                                                  For more options, visit https://groups.google.com/groups/opt_out.

                                                  --
                                                  --
                                                  You received this message from the "vim_dev" maillist.
                                                  Do not top-post! Type your reply below the text you are replying to.
                                                  For more information, visit http://www.vim.org/maillist.php
                                                   
                                                  ---
                                                  You received this message because you are subscribed to the Google Groups "vim_dev" group.
                                                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                                                  For more options, visit https://groups.google.com/groups/opt_out.
                                                • Ingo Karkat
                                                  ... Note that concealing has to extend the existing syntax, which can break it. You need autocmds to set it up (and keep it when the syntax changes). And it s
                                                  Message 24 of 27 , Aug 20, 2013
                                                    On 20-Aug-2013 02:16 +0200, Jesus Antonio Santos Giraldo wrote:

                                                    > Good one.
                                                    >
                                                    > Didn't knew about _concealing_ but so far it looks like the best
                                                    > approach to show spaces that I've seen.

                                                    Note that concealing has to extend the existing syntax, which can break
                                                    it. You need autocmds to set it up (and keep it when the syntax
                                                    changes). And it's buffer-local, not window-local like :set list. So
                                                    while it is a workaround, it is not a particularly good one.

                                                    > [3 lines deleted]

                                                    > Anyway for me *listchars* seems like the way it should be .

                                                    Since there seems to be quite some interest in this, offering this via
                                                    'listchars' indeed looks like the preferable solution. +1

                                                    -- regards, ingo

                                                    PS: Do not top-post! Type your reply below the text you are replying to.

                                                    --
                                                    --
                                                    You received this message from the "vim_dev" maillist.
                                                    Do not top-post! Type your reply below the text you are replying to.
                                                    For more information, visit http://www.vim.org/maillist.php

                                                    ---
                                                    You received this message because you are subscribed to the Google Groups "vim_dev" group.
                                                    To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                                                    For more options, visit https://groups.google.com/groups/opt_out.
                                                  • Christian Brabandt
                                                    ... Well changing the syntax rules is of course a way of breaking it, but I think it should work well enough most of the times. And while I am not very
                                                    Message 25 of 27 , Aug 20, 2013
                                                      On Tue, August 20, 2013 09:02, Ingo Karkat wrote:
                                                      > Note that concealing has to extend the existing syntax, which can break
                                                      > it.

                                                      Well changing the syntax rules is of course a way of breaking it, but
                                                      I think it should work well enough most of the times. And while I am not
                                                      very proficient with syntax highlighting, I haven't seen it break yet.

                                                      > You need autocmds to set it up (and keep it when the syntax
                                                      > changes).

                                                      You usually want to create a toggle, so you could simply create a
                                                      custom command that set's up the highlighting. To disable it, it
                                                      should be enough to call :syntax enable. Not sure, how often you will
                                                      encounter "syntax changes" after the buffer has been loaded into a window.

                                                      > And it's buffer-local, not window-local like :set list. So
                                                      > while it is a workaround, it is not a particularly good one.

                                                      You can use :ownsyntax to work around this as well.

                                                      >> Anyway for me *listchars* seems like the way it should be .
                                                      >
                                                      > Since there seems to be quite some interest in this, offering this via
                                                      > 'listchars' indeed looks like the preferable solution. +1

                                                      I don't have a particular strong opinion about that, I just wanted to
                                                      point out an existing alternative.

                                                      regards,
                                                      Christian

                                                      --
                                                      --
                                                      You received this message from the "vim_dev" maillist.
                                                      Do not top-post! Type your reply below the text you are replying to.
                                                      For more information, visit http://www.vim.org/maillist.php

                                                      ---
                                                      You received this message because you are subscribed to the Google Groups "vim_dev" group.
                                                      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                                                      For more options, visit https://groups.google.com/groups/opt_out.
                                                    • glts
                                                      On Mon, Aug 19, 2013 at 12:41 AM, Jesus Antonio Santos Giraldo ... Bram, I ve updated and tightened the patch a bit. Printing of lcs_space with ... help, I
                                                      Message 26 of 27 , Aug 24, 2013
                                                        On Mon, Aug 19, 2013 at 12:41 AM, Jesus Antonio Santos Giraldo
                                                        <jeansagi@...> wrote:
                                                        > Almost a year later since last comment, Vim 7.4 is out... and again there is no *space* option for listchars... :( :( :(
                                                        >
                                                        > Maybe anyone has implemented this patch in 7.4? If so, I really appreciate it.
                                                        > As I said a year ago, "It would be very, very, very usefull for my work".
                                                        >
                                                        >
                                                        > J.
                                                        >
                                                        > El viernes, 31 de agosto de 2012 17:34:16 UTC-5, Jesus Antonio Santos Giraldo escribió:
                                                        >> El lunes, 27 de agosto de 2012 05:59:48 UTC-5, 柳永峰 escribió:
                                                        >> > hi thanks,it's very useful to me
                                                        >> >
                                                        >> > On Wednesday, October 21, 2009 10:26:10 PM UTC+8, Arkanosis wrote:
                                                        >> > > Hello,
                                                        >> > >
                                                        >> > > I've just started to use Vim, and missed the possibility to display
                                                        >> > > middle-dots (or any other visible character) instead of spaces, so I
                                                        >> > > made the following patch.
                                                        >> > > It adds "space" in the allowed "listchars" arguments.
                                                        >> > >
                                                        >> > > Just in case someone find this useful ; I found easier to patch Vim
                                                        >> > > than to look for another existing solution ;-)
                                                        >> > >
                                                        >> > > Best regards,
                                                        >> > >
                                                        >> > > Index: option.c
                                                        >> > > ===================================================================
                                                        >> > > --- option.c (revision 1626)
                                                        >> > > +++ option.c (working copy)
                                                        >> > > @@ -6847,6 +6847,7 @@
                                                        >> > > {&lcs_ext, "extends"},
                                                        >> > > {&lcs_nbsp, "nbsp"},
                                                        >> > > {&lcs_prec, "precedes"},
                                                        >> > > + {&lcs_space, "space"},
                                                        >> > > {&lcs_tab2, "tab"},
                                                        >> > > {&lcs_trail, "trail"},
                                                        >> > > };
                                                        >> > > Index: screen.c
                                                        >> > > ===================================================================
                                                        >> > > --- screen.c (revision 1626)
                                                        >> > > +++ screen.c (working copy)
                                                        >> > > @@ -3886,6 +3886,18 @@
                                                        >> > > #endif
                                                        >> > > }
                                                        >> > >
                                                        >> > > + /* 'list' : change space to lcs_space. */
                                                        >> > > + if (wp->w_p_list && c == ' ' && lcs_space)
                                                        >> > > + {
                                                        >> > > + c = lcs_space;
                                                        >> > > + if (area_attr == 0 && search_attr == 0)
                                                        >> > > + {
                                                        >> > > + n_attr = 1;
                                                        >> > > + extra_attr = hl_attr(HLF_8);
                                                        >> > > + saved_attr2 = char_attr; /* save current attr */
                                                        >> > > + }
                                                        >> > > + }
                                                        >> > > +
                                                        >> > > if (extra_check)
                                                        >> > > {
                                                        >> > > #ifdef FEAT_SPELL
                                                        >> > > @@ -4040,7 +4052,7 @@
                                                        >> > > }
                                                        >> > > #endif
                                                        >> > >
                                                        >> > > - if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
                                                        >> > > + if (trailcol != MAXCOL && ptr > line + trailcol && (c == ' ' || c
                                                        >> > > == lcs_space))
                                                        >> > > {
                                                        >> > > c = lcs_trail;
                                                        >> > > if (!attr_pri)
                                                        >> > > Index: globals.h
                                                        >> > > ===================================================================
                                                        >> > > --- globals.h (revision 1626)
                                                        >> > > +++ globals.h (working copy)
                                                        >> > > @@ -1146,6 +1146,7 @@
                                                        >> > > EXTERN int lcs_tab1 INIT(= NUL);
                                                        >> > > EXTERN int lcs_tab2 INIT(= NUL);
                                                        >> > > EXTERN int lcs_trail INIT(= NUL);
                                                        >> > > +EXTERN int lcs_space INIT(= NUL);
                                                        >> > >
                                                        >> > > #if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT) \
                                                        >> > > || defined(FEAT_FOLDING)
                                                        >> > >
                                                        >> > > --
                                                        >> > > Jérémie Roquet - Arkanosis
                                                        >> > > Programming artist
                                                        >> > > Developer in natural language processing - Exalead
                                                        >>
                                                        >> That would be very useful for me!
                                                        >>
                                                        >>
                                                        >>
                                                        >> I'm developing a plaint text file now and was very excited while reading how listchars works specially the trail option. However almost immediately I find myself googling the way to convert middle-dots... until I found this thread.
                                                        >>
                                                        >>
                                                        >>
                                                        >> So, really, I can see real benefits from having this, besides looking the patch it seems not so difficult to merge or maintain... ( Things are easier to do if you don't have to do them yourself ;) )
                                                        >>
                                                        >>
                                                        >>
                                                        >> If you ever consider the possibility of including this count me on to test it.

                                                        Bram,

                                                        I've updated and tightened the patch a bit. Printing of lcs_space with
                                                        :list was missing, I added this. There were a few stray spaces in the
                                                        help, I cleaned this up too, while I was at it. I also added tests, for
                                                        'list' and :list.

                                                        By the way: introducing the new screenchar() to the test suite, it was
                                                        quite useful for writing the test.

                                                        I figured a little less complaining, a little more action would be in
                                                        order. :)

                                                        Best,



                                                        --
                                                        David Bürgin

                                                        --
                                                        --
                                                        You received this message from the "vim_dev" maillist.
                                                        Do not top-post! Type your reply below the text you are replying to.
                                                        For more information, visit http://www.vim.org/maillist.php

                                                        ---
                                                        You received this message because you are subscribed to the Google Groups "vim_dev" group.
                                                        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                                                        For more options, visit https://groups.google.com/groups/opt_out.
                                                      • glts
                                                        Dear Bram and list, ... I have updated this patch to apply cleanly to the current Vim version 7.4.471. Anecdote to accompany the patch. If you wish, take a
                                                        Message 27 of 27 , Oct 10, 2014
                                                          Dear Bram and list,

                                                          On Saturday, August 24, 2013 1:54:14 PM UTC+2, glts wrote:
                                                          > On Mon, Aug 19, 2013 at 12:41 AM, Jesus Antonio Santos Giraldo
                                                          > <jeansagi@...> wrote:
                                                          > > Almost a year later since last comment, Vim 7.4 is out... and again there is no *space* option for listchars... :( :( :(
                                                          > >
                                                          > > Maybe anyone has implemented this patch in 7.4? If so, I really appreciate it.
                                                          > > As I said a year ago, "It would be very, very, very usefull for my work".
                                                          > >
                                                          > >
                                                          > > J.
                                                          > >
                                                          > > El viernes, 31 de agosto de 2012 17:34:16 UTC-5, Jesus Antonio Santos Giraldo escribió:
                                                          > >> El lunes, 27 de agosto de 2012 05:59:48 UTC-5, 柳永峰 escribió:
                                                          > >> > hi thanks,it's very useful to me
                                                          > >> >
                                                          > >> > On Wednesday, October 21, 2009 10:26:10 PM UTC+8, Arkanosis wrote:
                                                          > >> > > Hello,
                                                          > >> > >
                                                          > >> > > I've just started to use Vim, and missed the possibility to display
                                                          > >> > > middle-dots (or any other visible character) instead of spaces, so I
                                                          > >> > > made the following patch.
                                                          > >> > > It adds "space" in the allowed "listchars" arguments.
                                                          > >> > >
                                                          > >> > > Just in case someone find this useful ; I found easier to patch Vim
                                                          > >> > > than to look for another existing solution ;-)
                                                          > >> > >
                                                          > >> > > Best regards,
                                                          > >> > >
                                                          > >> > > Index: option.c
                                                          > >> > > ===================================================================
                                                          > >> > > --- option.c (revision 1626)
                                                          > >> > > +++ option.c (working copy)
                                                          > >> > > @@ -6847,6 +6847,7 @@
                                                          > >> > > {&lcs_ext, "extends"},
                                                          > >> > > {&lcs_nbsp, "nbsp"},
                                                          > >> > > {&lcs_prec, "precedes"},
                                                          > >> > > + {&lcs_space, "space"},
                                                          > >> > > {&lcs_tab2, "tab"},
                                                          > >> > > {&lcs_trail, "trail"},
                                                          > >> > > };
                                                          > >> > > Index: screen.c
                                                          > >> > > ===================================================================
                                                          > >> > > --- screen.c (revision 1626)
                                                          > >> > > +++ screen.c (working copy)
                                                          > >> > > @@ -3886,6 +3886,18 @@
                                                          > >> > > #endif
                                                          > >> > > }
                                                          > >> > >
                                                          > >> > > + /* 'list' : change space to lcs_space. */
                                                          > >> > > + if (wp->w_p_list && c == ' ' && lcs_space)
                                                          > >> > > + {
                                                          > >> > > + c = lcs_space;
                                                          > >> > > + if (area_attr == 0 && search_attr == 0)
                                                          > >> > > + {
                                                          > >> > > + n_attr = 1;
                                                          > >> > > + extra_attr = hl_attr(HLF_8);
                                                          > >> > > + saved_attr2 = char_attr; /* save current attr */
                                                          > >> > > + }
                                                          > >> > > + }
                                                          > >> > > +
                                                          > >> > > if (extra_check)
                                                          > >> > > {
                                                          > >> > > #ifdef FEAT_SPELL
                                                          > >> > > @@ -4040,7 +4052,7 @@
                                                          > >> > > }
                                                          > >> > > #endif
                                                          > >> > >
                                                          > >> > > - if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
                                                          > >> > > + if (trailcol != MAXCOL && ptr > line + trailcol && (c == ' ' || c
                                                          > >> > > == lcs_space))
                                                          > >> > > {
                                                          > >> > > c = lcs_trail;
                                                          > >> > > if (!attr_pri)
                                                          > >> > > Index: globals.h
                                                          > >> > > ===================================================================
                                                          > >> > > --- globals.h (revision 1626)
                                                          > >> > > +++ globals.h (working copy)
                                                          > >> > > @@ -1146,6 +1146,7 @@
                                                          > >> > > EXTERN int lcs_tab1 INIT(= NUL);
                                                          > >> > > EXTERN int lcs_tab2 INIT(= NUL);
                                                          > >> > > EXTERN int lcs_trail INIT(= NUL);
                                                          > >> > > +EXTERN int lcs_space INIT(= NUL);
                                                          > >> > >
                                                          > >> > > #if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT) \
                                                          > >> > > || defined(FEAT_FOLDING)
                                                          > >> > >
                                                          > >> > > --
                                                          > >> > > Jérémie Roquet - Arkanosis
                                                          > >> > > Programming artist
                                                          > >> > > Developer in natural language processing - Exalead
                                                          > >>
                                                          > >> That would be very useful for me!
                                                          > >>
                                                          > >>
                                                          > >>
                                                          > >> I'm developing a plaint text file now and was very excited while reading how listchars works specially the trail option. However almost immediately I find myself googling the way to convert middle-dots... until I found this thread.
                                                          > >>
                                                          > >>
                                                          > >>
                                                          > >> So, really, I can see real benefits from having this, besides looking the patch it seems not so difficult to merge or maintain... ( Things are easier to do if you don't have to do them yourself ;) )
                                                          > >>
                                                          > >>
                                                          > >>
                                                          > >> If you ever consider the possibility of including this count me on to test it.
                                                          >
                                                          > Bram,
                                                          >
                                                          > I've updated and tightened the patch a bit. Printing of lcs_space with
                                                          > :list was missing, I added this. There were a few stray spaces in the
                                                          > help, I cleaned this up too, while I was at it. I also added tests, for
                                                          > 'list' and :list.
                                                          >
                                                          > By the way: introducing the new screenchar() to the test suite, it was
                                                          > quite useful for writing the test.
                                                          >
                                                          > I figured a little less complaining, a little more action would be in
                                                          > order. :)

                                                          I have updated this patch to apply cleanly to the current Vim version
                                                          7.4.471.

                                                          Anecdote to accompany the patch. If you wish, take a look at this
                                                          screenshot I took the other day:
                                                          https://raw.githubusercontent.com/glts/listchars-example/master/listchars-example.png
                                                          Looks like a tab-separated values file, doesn't it? Unfortunately, in
                                                          some columns tab is followed by one space, and this remains hidden even
                                                          though 'list' is set. This one took a minute to figure out ...

                                                          Thanks,
                                                          and have a nice day.


                                                          --
                                                          David Bürgin

                                                          --
                                                          --
                                                          You received this message from the "vim_dev" maillist.
                                                          Do not top-post! Type your reply below the text you are replying to.
                                                          For more information, visit http://www.vim.org/maillist.php

                                                          ---
                                                          You received this message because you are subscribed to the Google Groups "vim_dev" group.
                                                          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                                                          For more options, visit https://groups.google.com/d/optout.
                                                        Your message has been successfully submitted and would be delivered to recipients shortly.