Re: [PATCH] Allow 'set whitespacedisplay' in .nanorc

Peter Michaux <[email protected]> Fri, 25 Apr 2025 10:56:44 -0700
Newsgroups gmane.editors.nano.devel
Message-ID <CAG0y48AmUarXjro0ZOuJTiS=AhF-wNxDvnWcO6XS+CQV8AHDhw@mail.gmail.com>
On 25-04-2025 at 4:05 Benno Schulenberg wrote:
> You mean you use just one syntax for all of your files?

No, I did not mean that.

> Or have you extended all syntaxes with an extra rule?

I have extended some syntaxes with extra rules. I have created other
syntaxes with extra rules.

> But why?  None of you explains why it is useful to see whitespace.
> What is it that you actually want to see?  Do you want to see the
> dots so you can quickly count them and more easily see the difference
> between, say, five and six and seven spaces?  Or do you just want to
> see the difference between tabs and spaces?  Or more easily notice
> when there is an accidental double space?  Or... what?

Seeing whitespace is a helpful editor feature that I've become
accustomed to as part of my workflow and it helps me catch mistakes
quickly as I work. I would like to keep that as it makes my daily
work more efficient for me.

> For some of those things it is much more useful to add specific
> coloring rules.

For some of those things it is useful to add specific coloring
rules but not all things. Also, there may be coloring rules that are
difficult to create and so having whitespace visible helps me see
things that I don't have rules for or have not even anticipated.

On 25-04-2025 at 8:11 Ivan Vorontsov wrote:
>
> That's a one way to do it. But I prefer dots. And that's it, it's
> just preference. Nano allows to do it with toggle function, but
> not with command flag and setting as with other toggles. There
> are people who would like to set the option in nanorc. Nobody
> will loose anything, but some will gain.

I agree with Ivan. Adding a .nanorc configuration option that
benefits some users without harming other users is a worthwhile
enhancement.

Peter

On Fri, Apr 25, 2025 at 4:05 AM Benno Schulenberg <[email protected]> wrote:
>
>
> Op 24-04-2025 om 17:06 schreef Peter Michaux:
> > Like Ivan, I have defined syntax for coloring whitespace by a light color so it
> > is not intrusive.
>
> You mean you use just one syntax for all of your files?
> Or have you extended all syntaxes with an extra rule?
>
> > I would like to be able to set whitespace to be displayed in .nanorc so that it
> > is always on when I start nano.
>
> But why?  None of you explains why it is useful to see whitespace.
> What is it that you actually want to see?  Do you want to see the
> dots so you can quickly count them and more easily see the difference
> between, say, five and six and seven spaces?  Or do you just want to
> see the difference between tabs and spaces?  Or more easily notice
> when there is an accidental double space?  Or... what?
>
> For some of those things it is much more useful to add specific
> coloring rules.  For example, for multiple spaces between words:
>
>    color ,red "\b  +\b"
>
> To color tabs differently from spaces:
>
>    color ,#222 "        "
>
>
> Benno
>