GNOME Bugzilla – Bug 577593
Highlight trailing whitespace
Last modified: 2009-08-04 12:48:40 UTC
Trailing whitespace is evil, it should be highlighted in some way so it can be eradicated
View->Editor->White spaces is your friend.
That shows all whitespaces, which is annoying. I only want to see the trailing ones.
hmm, you might want to open a bug in gtksourceview then, maybe they can add such an option there.
hmm, you might want to open a bug in gtksourceview then, maybe they can add such an option there. BTW, thanks for all your bug-reports!
Ok, moved this one over to gtksourceview
Shouldn't be assigned to me!
Created attachment 139562 [details] [review] Highlight trailing whitespace in C files Here's a small patch to highlight whitespace errors in C source. It highlights the following: * trailing whitespace (spaces, tabs, etc.) * tabs with spaces on both sides, or just on the left * spaces with tabs on both sides I think adding whitespace highlighting in specific language files is probably the best way to solve this problem, seeing as there are many languages where whitespace (even trailing whitespace) is important, if not desired; XML for example. In C, I don't think there are any circumstances where it's wanted.
That really looks simple and good - ok to commit? Perhaps also useful for some other languages (Java, Vala, etc.)
(In reply to comment #8) > That really looks simple and good - ok to commit? Perhaps also useful for some > other languages (Java, Vala, etc.) Maybe in that case I should add those contexts to def.lang instead, and just reference them in c.lang, vala.lang, etc.?
Thanks for the patch Philip. gtksourceview already has support for drawing whitespaces and I'd prefer to extend that to draw trailing whitespace instead of defining them in the lang file
(In reply to comment #10) > gtksourceview already has support for drawing whitespaces and I'd prefer to > extend that to draw trailing whitespace instead of defining them in the lang > file How would you cope with languages where whitespace is important?
I suck at searching for duplicates. *** This bug has been marked as a duplicate of 551708 ***