Notepad3
Notepad3 copied to clipboard
Allow separate formatting of trailing blanks/whitespace
I know we have:
File > Line Endings > Default > Strip trailing blanks when saving,
View > Show Blanks and
Appearance > Customise Schemes > Common Base > Whitespace
But it would be really handy to be able to format trailing blanks separately:
Appearance > Customise Schemes > Common Base > Trailing Blanks
And perhaps even have a toggle for it:
View > Show Trailing Blanks
The idea is to achieve something like this:

If this is already possible, but I've just missed the option, please let me know.
You may "mark occurrences" of trailing blanks by Find RegEx '[ ]+$' and edit all matches by pressing Ctrl+Shift+Spacebar in edit window.
You can also delete all trailing spaces once by:
- Edit --> Selection --> Strip Trailing Blanks
- or directly by Alt+W
I think the the options to find and/or to "Strip Trailing Blanks" is good enough to handle this tasks ...

Ed.: ... at least I need a very good argument "why it is handy to see trailing blanks in the document". (Because I want to delete them is not good enough 😉)
Yes I mentioned that option in the original post.
However the reason being if I'm editing a section of a file I want to be aware of creating trailing blanks and not introduce them into the file, however when saving I don't want to remove legitimate trailing blanks for the remainder of the file, only being concerned with my small section.
Realistically having to search for them every time (as previously mentioned) is going to get forgotten, so they should scream in your face automatically.
So it would be enough to update the "training blanks marker/indicators" only for the visible area (instead of the whole file - marker update for whole file significantly slows down the UI response (hyperlinks, occurrence marker, multi selection, ...) )?
Yes, I assume that would work fine, happy to give feedback on any test builds if required.
@mustanggb - Thank you for opening this issue! I was looking for a "strip trailing blanks when saving" setting, but couldn't find it. (It did not occur to me to click on "Default..." because I figured that would only lead to a choice between CRLF/CR/LF.)
Small note: Maybe if it said "Defaults..." (plural) that would be a slight hint that there's more there.
As for the extra highlighting of trailing blanks, I agree with the project's developers that the use case is extremely narrow and probably not worth the development effort.
@jkyeung : Maybe they are a little bit "hidden" behind that dialog 🤔
What would be a better (additional) place (add to Menu->Settings->... between X... and Y...) ?
As for the extra highlighting of trailing blanks, I agree with the project's developers that the use case is extremely narrow and probably not worth the development effort.
That might be, but there are legitimate cases of trailing spaces (looking at you, Markdown! 😠). And I agree with @mustanggb that an option to see those trailing blanks (and only those) would be nice indeed…
Which commit was this completed in?