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

Benno Schulenberg <[email protected]> Fri, 25 Apr 2025 13:04:38 +0200
Newsgroups gmane.editors.nano.devel
Message-ID <[email protected]>
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
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEFo5vQpe/16ea/USWUUu+Lrjhlh8FAmgLbEYFAwAAAAAACgkQUUu+Lrjhlh/B
ORAAqMor22jb8St/kDkRetcaNSr2SzFETsLEi3E6lacBoLi9YfBwkjKym+chRJH/TVWTLX3jbuhv
O3sRG9S6r0ZchHvmNRGstyty4SY+p0Ue2EeRR0ImIrqI18jMCAGLRubR4SVryBRNf2x7QRZdK13C
Fs/M+QbqXfgP9+IIZ9ib0uWNQg1CGJjZ0ZS2GWNpxoSuSEn/y3Det+e8YdKXVJ+nldZlO4UGvwZz
R/zdKGQp3HoqzZSt3P9+R6jcF+ljCBDlb6d4z1JHnZcjOtS/QW37k5SDu136Vv0+SvHkLvuS6Rw0
TbBqFbZknXwWuRLxv35AF9G/jVYfXLJF/uiPB7uIB0urLxWpRqRJKfafR16QIFv+RTGnP3MvNxEf
dEGbAXO970+lgrmlUyx6i7weEzajvSfCaqC++6HyrHrbFVx84IwkjI0/SI4bAX73194lUgWpHEv9
Bk+xDeXSaS6/u2kV9uJjOOv5wt3sVhTIODBR5u4vvLzosJBBosjPrB7HZXdVluTYpZ+ocxgWTpV9
zE4D0fsZHo+yI0LZWVnFfUHlxzp7zb1FmjnJjIOzHCO3+QrEz/tHfE3yihR9YcjCU2jpkJV1EYg5
Q0rvQ79b3XEYA7Ns09x6U7gB0Nqtund2l43cZSN/o9zKp9KMRu6YyBzusq3YQhd0mkC/AtEWE1Kx
XC0=
=0Vu8
-----END PGP SIGNATURE-----