How do you disable trimming of trailing whitespace for patch files (e.g. .diff)?


#1

Apparently the setting can be scoped by some sort of language identifier. Is there one that applies to these? Disabling it is necessary, for example, for editing hunks when doing git add --patch.


#2

See the language-specific settings section of the Flight Manual:

https://atom.io/docs/latest/using-atom-basic-customization#language-specific-settings-in-your-config-file

Also, the whitespace package README:


#3

@leedohm

What language applies to .diff files?


#4

Maybe the language-diff package? Diff files isn’t something that’s built in, so it depends on what you choose to install.


#5

Thanks for the feedback. Needing to install an accessory package to disable a core editor setting for a particular file type is a pretty weird system. Food for thought.


#6

@leedohm wouldn’t it make sense to handle this in the language-git package. It already adds grammars for (git’s) commit, config, and rebase files.
Just thinking out loud.