Notepad++:如何在加载文件时自动将语言设置为 Xml

问题描述:

每当我在 Notepad++(这是一个 XML 文件)中编辑 .config 文件时,我都希望语法突出显示能够像 XML 一样自动为其着色.如何配置 Notepad++ 来执行此操作,以便每次打开 .config 文件时都不必手动选择它?

Whenever I edit a .config file in Notepad++ (which is an XML file) I want the syntax highlighting to automatically color it like XML. How do I configure Notepad++ to do this so that I don't have to manually select it every time I open a .config file?

谢谢.

您可以使用样式配置器(设置菜单)来实现:

You can do this by using the Style Configurator (Settings Menu):

此图显示的是 php 语言,但它适用于您要映射的任何语言

This image shows the php language, but it works for any language you want to map