我正在尝试为ST3中的文件类型创建语法特定设置。 根据文档,我应该找到我需要的东西
Sublime Text> Preferences> Settings - More> Syntax Specific - User
但是,当我点击它时,我只获得JSON.sublime-settings文件。 如果我想要一些其他设置文件怎么办?
I'm trying to create a syntax specific settings for file types in ST3. As per the documentation I am supposed to find what I need in
Sublime Text>Preferences>Settings - More>Syntax Specific - User
However, when I click that I only get JSON.sublime-settings file. What if I want some other settings file?
最满意答案
执行此操作时打开的设置文件对您当前正在编辑的文件类型很敏感。 因此,如果您在调用菜单命令时恰好位于JSON文件中,则会获得特定于JSON的设置文件。
为了获得特定于不同语法的设置,首先打开该类型的文件,或者创建一个空缓冲区,并通过菜单,命令选项板或菜单中的“ View > Syntax将语法设置为所需的语言。单击状态栏右侧的文件类型(它将显示Plain Text )时弹出。
您实际要保存的文件是User包中的Python.sublime-settings ,例如Python的Python.sublime-settings等。但是为了解决文件名的任何问题(如不正确的情况或拼写),通常更好它如上所述。
The settings file that opens when you do this is sensitive to the type of file that you're currently editing. So, if you happen to be in a JSON file when you invoke the menu command, you get the file for settings specific to JSON.
In order to get at the setting specific to a different syntax, open a file of that type first, or create an empty buffer and set the syntax to the desired language via View > Syntax from the menu, the command palette, or the menu that pops up when you click the file type in the right side of the status bar (where it will say Plain Text).
The file that you actually want to save is SyntaxName.sublime-settings in your User package, e.g. Python.sublime-settings for Python, etc. However to forstall any problems with the filename (like incorrect case or spelling) it's generally better to do it as above instead.
更多推荐
发布评论