+7
Under review

Trim trailing whitespace

jsageryd 10 years ago updated by Alexander Blach (Developer) 4 years ago 5
I would like an option to trim trailing whitespace. It would be nice if this could trigger automatically at some point. I am used to Sublime and vim trimming on save; perhaps a keyboard shortcut could work.
+1
Under review
I wouldn't do it automatically, since for example Markdown uses two trailing space characters in a line to signal that the user wants to have a line break (<br>) after this line.

I think it would also be necessary to have an option to show space characters (and other invisibles) similar to how tab characters can already be shown.
Yes, good point about markdown. It does not make sense there.

A shortcut key to trim trailing whitespace on the whole file or a selection would be a very nice feature, though. I'd be using it all the time.
+1
About showing spaces; I am using a plugin for Sublime (cannot recall its name at the moment and I am far away from a computer) that highlights trailing whitespace making it rather obvious where the mistake is.

It also highlights space before tab, which should never occur (the other way round is fine, though, for alignment).

Viewing invisible characters, especially spaces & tabs would definitely be a good feature, I'm using daily textastic for Python coding and am collecting quite a few unnecessary trailing spaces in sources (maybe an option to show only trailing ones ?)

+1

The current version can already display tab characters. The next update of Textastic (9.6) will also support showing spaces and newlines.