evandroforks/Whitespace

An exclude extensions/syntaxes option for `ensure_single_trailing_newline` #1

brian6932 posted onGitHub

For example, if you open a .patch file with this config and save, it'll break it as it requires 2 newlines at the end of statements.


Based on the guidance provided in the Syntax Manager documentation at Syntax Manager for Sublime Text 2/3, you can address this issue for .patch files. You can create a custom setting file specifically for the .patch syntax. To do this:

  1. Create a new file named Diff.sublime-settings in your Packages/User directory (this is the typical syntax settings file for .patch files in Sublime Text).
  2. Add the following content to this file:
    {
        "ensure_single_trailing_newline": false,
    }
    This setting will disable the ensure_single_trailing_newline option specifically for .patch files.

By doing this, you can maintain the required two newlines at the end of statements in .patch files, while keeping the ensure_single_trailing_newline feature active for other file types.

posted by evandrocoan over 1 year ago

Fund this Issue

$0.00
Funded

Pull requests