remove trailing spaces on saving the file

Bug #607138 reported by Matěj Cepl
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scribes
Triaged
Wishlist
Mystilleef

Bug Description

probably optionally, but it would be very useful. Clicking Alt+R,Ctrl+S gets boring

Revision history for this message
Mystilleef (mystilleef) wrote :

Scribes saves automatically. No need to press ctrl + s.

Not everyone wants trailing spaces removed from a file. It's hard (almost impossible?) to algorithmically figure out those who do from those who don't. While I completely favor automation, this is an area where unfortunately Scribes can't make a decision on behalf of the user.

Finally, I only provide options in Scribes to meet usability or accessibility requirements.

http://mystilleef.blogspot.com/2007/01/human-preferences-in-software-design.html

Solution: One thing you can do is a write a plugin that automates this for you.

Revision history for this message
John Gabriele (jmg3000) wrote :

I believe there should be an option in Preferences to have Scribes remove trailing spaces upon Save. The reason is this:

When I'm typing, sometimes autocomplete wants to erroneously complete a word it thinks is only partially typed (for example, if I have the word "helpful" in my document, and then some sentence ends with the word "help", hitting return autocompletes when I don't want it to).

Mystilleef has suggested elsewhere (bug #574755, comment #1) to hit Space before hitting Enter. This works fine, except that it leaves my documents littered with trailing spaces and requires me to remember to hit Alt-R all the time, which is a nuisance.

Having a Prefs option to set Scribes to remove trailing spaces upon Save would remove the nuisance.

Revision history for this message
Mystilleef (mystilleef) wrote :

I'm still not convinced.

Revision history for this message
John Gabriele (jmg3000) wrote :

Hm. Thinking more about this, I can see a scenarios where having such an option set and then forgetting about could cause problems, so I think I might be coming around to agree with you.

To deal with the autocomplete trailing spaces usability problem, I'm adding a comment to bug #574755.

Revision history for this message
Mystilleef (mystilleef) wrote :

Closing this as wontfix. Removing trailing spaces is an expensive process especially with large documents. So it's best to have the user do this manually.

Changed in scribes:
status: New → Won't Fix
Revision history for this message
Matěj Cepl (mcepl) wrote :

Could I ask for reopening this bug again at least as an optional wishlist? In some types of files trailing space is not recommended (e.g., Python, PEP8 Programming Recommendations suggests “Don't write string literals that rely on significant trailing whitespace. Such trailing whitespace is visually indistinguishable and some editors (or more recently, reindent.py) will trim them.”) and it always messes up VCS.

Mystilleef (mystilleef)
Changed in scribes:
status: Won't Fix → In Progress
importance: Undecided → Wishlist
status: In Progress → Triaged
assignee: nobody → Mystilleef (mystilleef)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.