Control: severity wishlist
Control: tags wontfix


Op 09-11-2024 om 11:17 schreef Martin-Éric Racine:
I have 'set trimblanks' in .nanorc and yet, most of the time, files get saved
with some trailing whitespace remaining.

One could argue that the option is poorly named, but... users should
really read the documentation.  For trimblanks, `man nanorc` says:
"Snip trailing whitespace from the wrapped line _when_ automatic
hard-wrapping occurs or _when_ text is justified."

Setting the option really should trim at all times, prior to saving a file.

You can arrange the trimming of all trailing whitespace yourself.
Search for "snipping" in the sample nanorc:

  grep -A1 snipping /usr/share/doc/nano/examples/sample.nanorc

That gives:

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


Benno

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to