xml 用于Go的Notepad ++语法高亮显示

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xml 用于Go的Notepad ++语法高亮显示相关的知识,希望对你有一定的参考价值。

<NotepadPlus>
    <UserLang name="Golang" ext="go" udlVersion="2.1">
    <!--
    NPP Syntax Highlight for Go
    using most used color in NPP for Golang.
    Author: blinksmith      Version: 0.1.3
    Last tested in Notepad++ v7.5.9
    
    Quick start :
    Method 1 
    - Download golang.udl.xml and then open notepad++
    - Go to Toolbar Menu -> Language -> "Define your language..." -> Import. 
    - Import golang.udl.xml and restart NPP.

    Method 2 (Recommended Version)
    - Go to https://stackoverflow.com/a/36329825/5882350 I will try to explain it in there.
    -->
        <Settings>
            <Global caseIgnored="no" decimalSeparator="2" />
        </Settings>
        <KeywordLists>
            <Keywords name="Comments">00// 01 02 03/* 04*/</Keywords>
            <Keywords name="Numbers, prefix1">A B C D E F a b c d e f X x O o</Keywords>
            <Keywords name="Numbers, range">A B C D E F a b c d e f X x O o</Keywords>
            <Keywords name="Operators1">&amp;^= := &gt;&gt;= &lt;&lt;= &gt;= &lt;= &lt;- -&gt; &lt;&lt; &gt;&gt; ... %= &amp;= += &amp;&amp; == != -= -= |= ++ || *= ^= /= %v %k %s %t | ! . - </Keywords>
            <Keywords name="Operators2">&amp; % ^ + / *</Keywords>
            <Keywords name="Folders in code1, open">{</Keywords>
            <Keywords name="Folders in code1, close">}</Keywords>
            <Keywords name="Keywords1">package import type func var const</Keywords>
            <Keywords name="Keywords2">break case chan continue default defer else func() fallthrough for go goto if interface map range return select switch true false</Keywords>
            <Keywords name="Keywords3">struct append bool byte cap close closed copy imag len make new panic print println range real recover select string utf8 nil</Keywords>
            <Keywords name="Keywords4">int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 uintptr float32 float64 complex complex128 complex64 iota</Keywords>
            <Keywords name="Delimiters">00[ 01 02] 03&quot; 04 05&quot; 06&apos; 07 08&apos; 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
        </KeywordLists>
        <Styles>
            <!--
            000000 black for default color.
            AA0000 red for important thing.
            800000 dark red the most important.
            0000FF blue for function.
            000080 dark blue for operator.
            008000 green for comment line, we use 008040.
            FF8000 orange for number.
            8000FF purple for double quoted. #FIXME black
            -->
            <WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="LINE COMMENTS" fgColor="008040" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="NUMBERS" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS1" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS2" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS3" fgColor="AA0000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS4" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="OPERATORS" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
            <WordsStyle name="FOLDER IN CODE1" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS1" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS2" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS3" fgColor="AA0000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
        </Styles>
    </UserLang>
</NotepadPlus>

以上是关于xml 用于Go的Notepad ++语法高亮显示的主要内容,如果未能解决你的问题,请参考以下文章

使用ICSharpCode.TextEditor制作一个语法高亮显示的XML编辑器

如何让notepad++支持自定义文件的语法高亮

试着在Notepad ++中找到ColdFusion的语法高亮显示

在Notepad++里如何设置语法高亮

notepad++到底怎么高亮显示函数?

notepad++怎么设置代码颜色?