Sublime Text 3特定文件类型设置仅具有JSON文件设置。(Sublime Text 3 specific file type settings only has JSON file set

编程入门 行业动态 更新时间:2024-10-27 11:27:55
Sublime Text 3特定文件类型设置仅具有JSON文件设置。(Sublime Text 3 specific file type settings only has JSON file settings. How to create new?)

我正在尝试为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.

更多推荐

本文发布于:2023-08-03 07:40:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1385223.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件类型   文件   JSON   Sublime   Text

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!