Home  >  Article  >  Development Tools  >  How to set the default syntax of a certain extension file in sublime text

How to set the default syntax of a certain extension file in sublime text

藏色散人
藏色散人forward
2020-07-01 11:36:415787browse

The following tutorial column of sublime will introduce to you the default syntax for setting a certain extension file in sublime text. I hope it will be helpful to friends in need!

How to set the default syntax of a certain extension file in sublime text

For files with normal extensions (suffixes), sublime text can recognize them.

For Other unusual extensions cannot be recognized by sublime text.

For example, the language files of some software, such as zh-cn.lng, lng extension sublime text It cannot be recognized and can only be regarded as ordinary text by default, but it is actually a file in xml format.

We can select xml through the menu: View->Syntax, so that sublime text will display the file based on xml .

So can you let sublime text permanently remember the lng suffix as xml file in the future?

Of course you can, it’s actually very simple.

1. Open zh-ch .lng file

2. Click Plain Text in the lower right corner, and all file formats will appear.

How to set the default syntax of a certain extension file in sublime text

3. Select open all with current extension as… ->XML

How to set the default syntax of a certain extension file in sublime text

4. In this way, the type of file with this suffix will be remembered in the future

In fact, the internal part is in Data\Packages\ A file named XML.sublime-settings is generated in the User\ directory.

The content of the file is:

{
"extensions":
[
"xml",
"xsd",
"xslt",
"svg",
"lng"
]

As you can see from the file, lng

is added to the value of extensions

The above is the detailed content of How to set the default syntax of a certain extension file in sublime text. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete