Home > Development Tools > sublime > body text

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

藏色散人
Release: 2020-07-01 11:37:33
forward
5769 people have browsed it

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"
]
Copy after login

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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!