SublimeText / TrailingSpaces

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

"trailing_spaces_syntax_ignore" doesn't work #96

Closed Commenter123 closed 4 years ago

Commenter123 commented 8 years ago

So I found this setting "trailing_spaces_syntax_ignore" which allows to "ignore" files. Added this to the Plugin's user config:

"trailing_spaces_syntax_ignore": ["Diff", "Markdown"] Then opened a .md file, Set Syntax to "Markdown", but the Plugin is still trimming trailing spaces.

What's the problem? If I set "trailing_spaces_trim_on_save" to false, trailing spaces are not removed. So I think it's a problem of this plugin, isn't it?

Aratramba commented 8 years ago

I'm having the same problem with pug/jade-files. This package will remove spaces regardless of the syntax-ignore rule.

"trailing_spaces_syntax_ignore": ["Pug", "Jade"]
3askaal commented 8 years ago

Same for me.

jesusbv commented 7 years ago

Me too, found this, maybe help you in the meantime

Tohsig commented 7 years ago

Note for people like me that may still be having issues with this setting: Restart ST. As of this comment, changes to the TrailingSpaces settings don't seem to stick until you do. With that, using the base package name (e.g. "Markdown Extended") in the "trailing_spaces_syntax_ignore" array does indeed work. Sorry to bump an oldish thread, but this seems to be a common confusion.

arhohryakov commented 4 years ago

In my case the base name of syntax file works: i'm using string "Bash" for syntax Bourne Again Shell (bash) with base file Bash.sublime-syntax.

rchl commented 4 years ago

ST restart is needed after changing settings currently.