用户定义的语言不适用于Notepad ++中的指定文件类型 [英] User-defined language not applying to specified file types in Notepad++
问题描述
我已经在Notepad ++中创建了一种相当简单的用户定义语言,并为其提供了相关的扩展名.但是,当我打开用该扩展名命名的文件时,没有任何反应.没有语法突出显示或注释突出显示.
I have created a fairly simple user-defined language in Notepad++, and given it an associated extension. But, when I open files I have named with that extension, nothing happens. No syntax highlighting, or comment highlighting.
知道我做错了什么吗?
扩展程序的设置没有以Notepad ++文档中指定的前导"."
.
The settings for the extension do not have a leading "."
, as specified in the Notepad++ docs.
推荐答案
此问题已得到解决,因此我想可以关闭或删除整个问题.我不确定它们是在哪个版本中修复的,但是在最新的v6.5.1中,一切都按预期工作.
This has been fixed, so I guess the whole question could be closed or deleted. I'm not sure in which version they fixed it, but in the latest v6.5.1 everything works as intended.
- 转到菜单
Language > Define your language...
- 创建新语言或从下拉菜单中选择现有语言
- 在
Ext.
文本框中,添加所需的扩展名,且不加前导.".如果您有多个扩展名,则空格分隔. - 现在打开具有这种扩展名的文件,并正确突出显示该文件.要确认用户定义语言扩展名正确,您还可以查看通常存储在
%APPDATA%\Notepad++\
文件夹中的userDefineLang.xml
.
- Go to menu
Language > Define your language...
- Create a new language or select from the dropdown menu an existing one
- In the
Ext.
text box add your desired extension with no leading "." and space separated if you have multiple extensions. - Now open a file with such extension and it is properly highlighted. To confirm that the User Defined Language extension is correct, you can also take a look at the
userDefineLang.xml
usually stored in your%APPDATA%\Notepad++\
folder.
这篇关于用户定义的语言不适用于Notepad ++中的指定文件类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!