Notepad++ 配色自动完成配置文件说明

来源:互联网 发布:微分销软件 编辑:程序博客网 时间:2024/05/22 01:55

Notepad++内置语言的基本配置在langs.xml,内容包括语言名称,注释字符(包括行注释和块注释),文件类型后缀,以及各种级别的关键字。

这是Java语言的示例:

<Language name="java" ext="java" commentLine="//" commentStart="/*" commentEnd="*/">            <Keywords name="instre1">instanceof assert if else switch case default break goto return for while do continue new throw throws try catch finally this super extends implements import true false null</Keywords>            <Keywords name="type1">package transient strictfp void char short int long double float const static volatile byte boolean class interface native private protected public final abstract synchronized enum</Keywords></Language>

单词的自动完成提示在Notepad++的plugins/APIs目录下,和语言名称相同的一个同名xml文件。这个文件也很简单,一个示例如下:

<?xml version="1.0" encoding="Windows-1252" ?><NotepadPlus><AutoComplete><KeyWord name="above" /><KeyWord name="abs" /><KeyWord name="acos" /><KeyWord name="zIndex" /><KeyWord name="_content" /></AutoComplete></NotepadPlus>

内置语言的配色字体文件在stylers.xml文件。

用户自定义语言的配色和关键字都是一个独立的xml文件。