TrailingSpaces icon indicating copy to clipboard operation
TrailingSpaces copied to clipboard

"trailing_spaces_syntax_ignore" doesn't work

Open Commenter123 opened this issue 10 years ago • 6 comments

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?

Commenter123 avatar Dec 04 '15 08:12 Commenter123

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"]

Aratramba avatar Jun 08 '16 08:06 Aratramba

Same for me.

baskaal avatar Jun 08 '16 08:06 baskaal

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

jesusbv avatar Dec 09 '16 15:12 jesusbv

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.

tohsig avatar Mar 06 '17 17:03 tohsig

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.

arhohryakov avatar Dec 20 '19 06:12 arhohryakov

ST restart is needed after changing settings currently.

rchl avatar Mar 23 '20 18:03 rchl