#566827 nano: configuration file option to strip trailing space at save time

Package:
nano
Source:
nano
Description:
small, friendly text editor inspired by Pico
Submitter:
Martin-Éric Racine
Date:
2024-11-09 13:21:02 UTC
Severity:
wishlist
Tags:
#566827#5
Date:
2010-01-25 09:37:04 UTC
From:
To:
I really welcome the recent additions of these color highlighting features. Thank you!

However, when it comes to trailing whitespace, it would be much more useful to have an options to strip it rather than highlight it. Could this wishlist item be forwarded upstream?

- -- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-11-generic (SMP w/1 CPU core)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages nano depends on:
ii  dpkg                      1.15.5.6       Debian package management system
ii  install-info              4.13a.dfsg.1-5 Manage installed documentation in
ii  libc6                     2.10.2-2       GNU C Library: Shared libraries
ii  libncursesw5              5.7+20090803-2 shared libraries for terminal hand

nano recommends no packages.

Versions of packages nano suggests:
pn  spell                         <none>     (no description available)

- -- no debconf information
iEYEARECAAYFAktdZj4ACgkQeXr56x4Muc1gFACfRz1U4l5BrbsAPc+MPmE6/ri2
kNwAn0JHNMdO6WMWpguhAegoXEbopqAb
=w+O7
-----END PGP SIGNATURE-----

#566827#12
Date:
2024-11-09 12:31:15 UTC
From:
To:
Control: tags 566827 wontfix

The custom solution (since nano-7.0) is to add two lines to your .nanorc:

   ## For snipping trailing blanks when you save a file:
   bind ^S "{execute}| sed 's/\s\+$//' {enter}{savefile}" main


Benno

#566827#19
Date:
2024-11-09 13:16:09 UTC
From:
To:
la 9. marrask. 2024 klo 14.31 Benno Schulenberg (bensberg@telfort.nl) kirjoitti:

As others told you on the upstream bug, that is not what was requested.

Martin-Éric