SublimeText / TrailingSpaces

Highlight trailing spaces and delete them in a flash.
MIT License
896 stars 94 forks source link

New config option: `trailing_spaces_scope_ignore` #113

Closed smanolloff closed 4 years ago

smanolloff commented 7 years ago

Also, remove mentions of the inferior trailing_spaces_syntax_ignore option in the README (still considered in the code for backward compat).

Default value:

// Trailing spaces for find results and build output are ignored
"trailing_spaces_scope_ignore": ["text.find-in-files", "source.build_output"]

This PR supersedes #98 (which I will now close).

This is a more flexible variation of the syntax ignore setting, as it provides fine-grained control over the ignored matches.

FichteFoll commented 4 years ago

I like this, but it will take some manual effort to merge this along with the others PRs currently.

rchl commented 4 years ago

I think syntax ignoring should still be a first-world citizen and not just deprecated as scope matching is not gonna help with Terminus which runs in text.plain scope. And I would consider Terminus to be important enough to warrant keeping that functionality.

EDIT: Actually Terminus is also using plain text syntax so can't exclude by syntax either.

FichteFoll commented 4 years ago

Maybe exclude scratch views?

rchl commented 4 years ago

Could do but:

Whatever we do, someone will complain anyway :)

FichteFoll commented 4 years ago

Unsaved views are not scratch views. It should be fine as the (unconfigurable) default since scratch views can only be created by plugins.

rchl commented 4 years ago

Since this is so old PR and I'm not sure if the author still has an interest in it, I've merged change manually as 6bf6b8801622a990f54cf336605e4d7290c573df with fixes for my comments applied.

Thanks for working on it and sorry it took so long. :)