Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

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

Shulou Source: shulou.com Published: 2022-06-02 18:41:19 11月14日 Update

This article mainly introduces how to set the default syntax of a certain extension file in sublime text. It is very detailed and has a certain reference value. Friends who are interested must read it!

Sublime text can recognize files with normal extensions (suffixes).

Sublime text does not recognize other unusual extensions.

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

We can select xml from the menu: view-> syntax, so that sublime text will display the file according to xml.

So can it be the xml file that makes sublime text remember the lng suffix permanently in the future?

Of course, it's actually very simple.

1. Open the zh-ch.lng file

two。 Click the Plain Text in the lower right corner and all the file formats will appear.

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

4. In this way, you will remember the type of file with this suffix later.

In fact, the interior is to generate a file named XML.sublime-settings in the Data\ Packages\ User\ directory.

The contents of the document are:

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

You can see from the file that lng is added to the value of extensions

The above is all the contents of the article "how to set the default syntax for a certain extension file in sublime text". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: File extension grammar content suffix that is format article selection ordinary ordinary value interest can be passed name buddy partner text more directory Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Tech Info Microsoft Redmi Xiaomi