I have an option trim_trailing_white_space_on_save
turned on. And for some files I should prevent removing trailing white spaces, because they are important.
How to remove this behaviour for some files, e.g. *.dat?
I have an option trim_trailing_white_space_on_save
turned on. And for some files I should prevent removing trailing white spaces, because they are important.
How to remove this behaviour for some files, e.g. *.dat?
Have you already tried to create a configuration file for that specific extension and put trim_trailing_white_space_on_save = false ?
Settings Files
Settings files are consulted in this order:
- Packages/Default/Preferences.sublime-settings
- Packages/Default/Preferences (< platform >).sublime-settings
- Packages/User/Preferences.sublime-settings
- < Project Settings >
- Packages/< syntax >/< syntax >.sublime-settings
- Packages/User/.sublime-settings
- < Buffer Specific Settings >
In general, you should place your settings in Packages/User/Preferences.sublime-settings.
If you want to specify settings for a certain file type, for example, Python, you should place them in Packages/User/Python.sublime-settings.
http://www.sublimetext.com/docs/2/settings.html
In Sublime 3, just open any file with the extension you'd like to have specific settings for, and go to Preferences > Settings - Syntax Specific
.
In my case I did it for Markdown (.md) and Sublime created a Markdown.sublime-settings
file in which I added the following:
"trim_trailing_white_space_on_save": false,
In your case, for a .dat file, Sublime will create a Plain text.sulbime-settings file
in which you can add the exact same setting.