Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trimming trailing spaces based on file type #18998

Closed
im-n1 opened this issue Jan 22, 2017 · 3 comments
Closed

Trimming trailing spaces based on file type #18998

im-n1 opened this issue Jan 22, 2017 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@im-n1
Copy link

im-n1 commented Jan 22, 2017

Hi there,

I love auto trimming trailing spaces but I had to turn it off because in certain file types it breaks the syntax. For instance Jade/Pug.
It would be great if I could specify where the trimming would be disabled. Something like:

files.trimTrailingWhitespaceExclude: [
    ".jade",
    ".pug",
]

Just simple extension recognition would do the job.

Thank you in advance.

@ramya-rao-a
Copy link
Contributor

@grafa Nice timing. With #1587 you should be able to this.
@sandy081 #1587 is shipping in Jan correct?

@sandy081
Copy link
Member

@ramya-rao-a Yes #1587 is being targetted for January. But this is scoped only to language based settings. In the above case, you can achieve this by configuring languages to file types and customizing settings per language.

For example

File association to language

.jade -> jade
.pug-> pug

Language based settings (In Settings)

"[jade]" : {
file.trimTrailingWhitespace: false
},
"[pug]" : {
file.trimTrailingWhitespace: false
}

@sandy081 sandy081 self-assigned this Jan 23, 2017
@sandy081 sandy081 added the *duplicate Issue identified as a duplicate of another issue(s) label Jan 23, 2017
@sandy081
Copy link
Member

Duplicates #1587

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants