如何关闭 Sublime Text 2 中某些文件的删除空格? [英] How to turn removing whitespaces off for some files in Sublime Text 2?

查看:45
本文介绍了如何关闭 Sublime Text 2 中某些文件的删除空格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打开了一个选项 trim_trailing_white_space_on_save.对于某些文件,我应该防止删除尾随空格,因为它们很重要.

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.

如何删除某些文件的这种行为,例如*.dat?

How to remove this behaviour for some files, e.g. *.dat?

推荐答案

您是否已经尝试过为该特定扩展创建配置文件并设置 trim_trailing_white_space_on_save = false ?

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:

  1. Packages/Default/Preferences.sublime-settings
  2. 包/默认/首选项(<平台>).sublime-settings
  3. Packages/User/Preferences.sublime-settings
  4. <项目设置 >
  5. 包/<语法 >/<语法 >.sublime-settings
  6. 包/用户/.sublime-settings
  7. <缓冲区特定设置 >

通常,您应该将设置放在 Packages/User/Preferences.sublime-settings 中.

In general, you should place your settings in Packages/User/Preferences.sublime-settings.

如果要为特定文件类型(例如 Python)指定设置,则应将它们放在 Packages/User/Python.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

这篇关于如何关闭 Sublime Text 2 中某些文件的删除空格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆