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


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.


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

Also, the whitespace package README:



What language applies to .diff files?


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


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.


@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.