Set the default syntax for any extension file in sublime text 2

Source: Internet
Author: User
Tags sublime text

many *. config type file (such as app. config/dataimportsetting. config etc .), these files are actually XML files, but the extension is not *. XML is *. config . At this time, if we edit these files in Visual Studio, VS can automatically identify the XML file and Automatically highlight it according to the XML syntax, however, if you like to use a text editor like sublime text 2 to edit the config file, you may need to manually set the file to display in XML syntax after opening the file. It is difficult to manually set the syntax every time, so you can decide whether to modify the sublime text 2 configuration for automatic identification.

since all settings of sublime text 2 are directly sent to files, there is no GUI for setting, it takes a lot to complete this idea, but finally, the answer is found on the omnipotent stackoverflow by % appdata %/ packages/XML. add a config line to tmlanguage and restart sublime text 2, similarly, if we want sublime text 2 to apply a default syntax to files with any extension, we only need to find the package corresponding to the syntax and add the extension to the configuration.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.