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

953 views
Skip to first unread message

Jérémie Roquet

unread,
Oct 21, 2009, 10:26:10 AM10/21/09
to vim...@vim.org
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

Steve Hall

unread,
Oct 21, 2009, 10:43:23 AM10/21/09
to vim...@googlegroups.com, vim...@vim.org
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 ]


Jérémie Roquet

unread,
Oct 21, 2009, 11:06:19 AM10/21/09
to vim...@vim.org
2009/10/21 Jérémie Roquet <arka...@gmail.com>:

> 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,

== lcs_space && lcs_space))

Bram Moolenaar

unread,
Oct 28, 2009, 5:06:10 PM10/28/09
to Jérémie Roquet, vim...@vim.org

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 -- Br...@Moolenaar.net -- 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 ///

Steve Hall

unread,
Oct 28, 2009, 7:29:04 PM10/28/09
to vim...@googlegroups.com, Jérémie Roquet, vim...@vim.org
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? :)

Jérémie Roquet

unread,
Oct 29, 2009, 6:09:07 AM10/29/09
to vim...@vim.org, Bram Moolenaar, Steve Hall
Hello,

2009/10/28 Bram Moolenaar <Br...@moolenaar.net>:


>> 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 <digi...@dancingpaper.com>


> 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)

Bram Moolenaar

unread,
Oct 29, 2009, 5:05:48 PM10/29/09
to Jérémie Roquet, vim...@vim.org, Steve Hall

Jérémie Roquet wrote:

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

Jérémie Roquet

unread,
Oct 30, 2009, 7:42:39 AM10/30/09
to Bram Moolenaar, vim...@vim.org, Steve Hall
2009/10/29 Bram Moolenaar <Br...@moolenaar.net>:

> Jérémie Roquet wrote:
>> 2009/10/28 Bram Moolenaar <Br...@moolenaar.net>:
>> >> 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'*

jpetrie

unread,
Oct 5, 2011, 1:15:03 PM10/5/11
to vim...@vim.org
> 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.

Christian Brabandt

unread,
Oct 5, 2011, 5:07:44 PM10/5/11
to vim...@vim.org
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
--

James Vega

unread,
Oct 5, 2011, 5:42:14 PM10/5/11
to vim...@vim.org
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/19e866460910290309w27...@mail.gmail.com

--
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jame...@jamessan.com>

signature.asc

Christian Brabandt

unread,
Oct 6, 2011, 2:34:31 PM10/6/11
to vim...@vim.org
Hi James!

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.

Bram Moolenaar

unread,
Oct 6, 2011, 5:21:28 PM10/6/11
to Christian Brabandt, vim...@vim.org

Christian Brabandt wrote:

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 -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\

\\\ an exciting new programming language -- http://www.Zimbu.org ///

Ben Fritz

unread,
Oct 6, 2011, 6:43:01 PM10/6/11
to vim_dev


On Oct 6, 4:21 pm, Bram Moolenaar <B...@Moolenaar.net> 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...@mail.gmail.com
>
> > 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 :-)

Jesus Antonio Santos Giraldo

unread,
Aug 18, 2013, 6:41:20 PM8/18/13
to vim...@googlegroups.com, vim...@vim.org, Jesús 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 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
> 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.

Steve Hall

unread,
Aug 18, 2013, 7:08:35 PM8/18/13
to vim...@googlegroups.com
On Sun, Aug 18, 2013 at 6:41 PM, Jesus Antonio Santos Giraldo <jean...@gmail.com> 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  ]

Jesus Antonio Santos Giraldo

unread,
Aug 18, 2013, 7:13:50 PM8/18/13
to vim...@googlegroups.com
Not to mention that there is already a patch for it... :(


J.


2013/8/18 Steve Hall <digi...@dancingpaper.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+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Christian Brabandt

unread,
Aug 19, 2013, 3:47:31 PM8/19/13
to vim...@googlegroups.com
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

glts

unread,
Aug 19, 2013, 5:02:35 PM8/19/13
to vim...@googlegroups.com
+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

Jesus Antonio Santos Giraldo

unread,
Aug 19, 2013, 7:04:07 PM8/19/13
to vim...@googlegroups.com
je je... "I mean, if even Microsoft Word can show space characters"... nice catch !

Interesting link on stackoverflow BTW.


J.


2013/8/19 glts <676c...@gmail.com>

--

Jesus Antonio Santos Giraldo

unread,
Aug 19, 2013, 8:16:00 PM8/19/13
to vim...@googlegroups.com
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 <cbl...@256bit.org>

Ingo Karkat

unread,
Aug 20, 2013, 3:02:18 AM8/20/13
to vim...@googlegroups.com
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.

Christian Brabandt

unread,
Aug 20, 2013, 3:27:43 AM8/20/13
to vim...@googlegroups.com
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

glts

unread,
Aug 24, 2013, 7:54:14 AM8/24/13
to vim...@googlegroups.com
On Mon, Aug 19, 2013 at 12:41 AM, Jesus Antonio Santos Giraldo
<jean...@gmail.com> wrote:
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
listchars-space.diff

Jesus Antonio Santos Giraldo

unread,
Aug 24, 2013, 8:23:13 PM8/24/13
to vim...@googlegroups.com
Nice one !

I'm not proficient at cloning/compiling/patching vim or things alike but I could help with any test that is needed.


J.



2013/8/24 glts <676c...@gmail.com>



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

Bram Moolenaar

unread,
Aug 25, 2013, 7:30:19 AM8/25/13
to glts, vim...@googlegroups.com

glts wrote:

> On Mon, Aug 19, 2013 at 12:41 AM, Jesus Antonio Santos Giraldo
> <jean...@gmail.com> 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 appreciat=
> e it.
> > As I said a year ago, "It would be very, very, very usefull for my work".

[...]

> 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. :)

Thanks, I'll update the note in the todo list.

--
"Computers in the future may weigh no more than 1.5 tons."
Popular Mechanics, 1949

Jesus Antonio Santos Giraldo

unread,
Aug 25, 2013, 10:00:51 AM8/25/13
to vim...@googlegroups.com
Maybe 7.5 may have it...


J.


2013/8/25 Bram Moolenaar <Br...@moolenaar.net>

glts

unread,
Oct 10, 2014, 9:37:02 AM10/10/14
to vim...@googlegroups.com
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 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
listchars-space.patch
Reply all
Reply to author
Forward
0 new messages