Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc/notepadplus: use new User Defined Language system (UDL2)
Add missing single quotation and backslash marks. Change dot and underscore character keyword type. "_" is a predeclared identifier, not a operator. "." is a selector, x.f should be one identifier highlight. So the fix is to change it. Fixes #5775. Fixes #5788. Fixes #5798. R=golang-dev, r CC=golang-dev https://golang.org/cl/10480044
- Loading branch information
Showing
2 changed files
with
90 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,37 @@ | ||
Given a Notepad++ installation at <DIR>: | ||
Notepad++ syntax highlighting | ||
----------------------------- | ||
|
||
1. Add the contents of userDefineLang.xml at <DIR>\userDefineLang.xml | ||
between <NotepadPlus> ... </NotepadPlus> | ||
|
||
2. Copy go.xml to <DIR>\plugins\APIs | ||
The userDefineLang.xml uses the new User Defined Language system (UDL2), | ||
which needs Notepad++ v6.2 or higher. | ||
|
||
Installing from Notepad++ Installer | ||
|
||
1. Add the contents of userDefineLang.xml at %APPDATA%\Notepad++\userDefineLang.xml | ||
between <NotepadPlus> ... </NotepadPlus> | ||
2. Restart Notepad++ | ||
|
||
Installing from Notepad++ zip/7z package | ||
|
||
1. Given a Notepad++ installation at <DIR>. | ||
2. Add the contents of userDefineLang.xml at <DIR>\userDefineLang.xml | ||
between <NotepadPlus> ... </NotepadPlus> | ||
3. Restart Notepad++ | ||
|
||
Reference | ||
|
||
1. http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=User_Defined_Languages | ||
2. http://notepad-plus-plus.org/news/notepad-6.2-release-udl2.html | ||
3. http://udl20.weebly.com/index.html | ||
|
||
|
||
Notepad++ keyword auto-completion | ||
--------------------------------- | ||
|
||
1. Given a Notepad++ installation at <DIR>. | ||
2. Copy go.xml to <DIR>\plugins\APIs | ||
3. Restart Notepad++ | ||
|
||
Reference | ||
|
||
1. http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Auto_Completion | ||
|
||
3. Restart Notepad++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,64 @@ | ||
<!-- <NotepadPlus> --> | ||
<UserLang name="go" ext="go"> | ||
<UserLang name="go" ext="go" udlVersion="2.1"> | ||
<Settings> | ||
<Global caseIgnored="no" /> | ||
<TreatAsSymbol comment="no" commentLine="no" /> | ||
<Prefix words1="no" words2="no" words3="no" words4="no" /> | ||
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> | ||
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> | ||
</Settings> | ||
<KeywordLists> | ||
<Keywords name="Delimiters">"`0"`</Keywords> | ||
<Keywords name="Folder+"></Keywords> | ||
<Keywords name="Folder-"></Keywords> | ||
<Keywords name="Operators">( ) [ ] { } ... . , ; _ & ^ % > < ! = + - * / | :</Keywords> | ||
<Keywords name="Comment"> 1/* 2*/ 0//</Keywords> | ||
<Keywords name="Words1">append bool break byte cap case chan close complex complex128 complex64 const continue copy default defer delete else error fallthrough false float32 float64 for func go goto if iota imag import int int16 int32 int64 int8 interface len make map new nil package panic print println range real recover return rune select string struct switch true type uint uint16 uint32 uint64 uint8 uintptr var</Keywords> | ||
<Keywords name="Words2"></Keywords> | ||
<Keywords name="Words3"></Keywords> | ||
<Keywords name="Words4"></Keywords> | ||
<Keywords name="Comments">00// 01 02 03/* 04*/</Keywords> | ||
<Keywords name="Numbers, prefix1"></Keywords> | ||
<Keywords name="Numbers, prefix2"></Keywords> | ||
<Keywords name="Numbers, extras1"></Keywords> | ||
<Keywords name="Numbers, extras2"></Keywords> | ||
<Keywords name="Numbers, suffix1"></Keywords> | ||
<Keywords name="Numbers, suffix2"></Keywords> | ||
<Keywords name="Numbers, range"></Keywords> | ||
<Keywords name="Operators1">( ) [ ] { } ... , ; & ^ % > < ! = + - * / | :</Keywords> | ||
<Keywords name="Operators2"></Keywords> | ||
<Keywords name="Folders in code1, open"></Keywords> | ||
<Keywords name="Folders in code1, middle"></Keywords> | ||
<Keywords name="Folders in code1, close"></Keywords> | ||
<Keywords name="Folders in code2, open"></Keywords> | ||
<Keywords name="Folders in code2, middle"></Keywords> | ||
<Keywords name="Folders in code2, close"></Keywords> | ||
<Keywords name="Folders in comment, open"></Keywords> | ||
<Keywords name="Folders in comment, middle"></Keywords> | ||
<Keywords name="Folders in comment, close"></Keywords> | ||
<Keywords name="Keywords1">break default func interface select case defer go map struct chan else goto package switch const fallthrough if range type continue for import return var</Keywords> | ||
<Keywords name="Keywords2">bool byte complex64 complex128 error float32 float64 int int8 int16 int32 int64 rune string uint uint8 uint16 uint32 uint64 uintptr true false iota nil</Keywords> | ||
<Keywords name="Keywords3">append cap close complex copy delete imag len make new panic print println real recover _</Keywords> | ||
<Keywords name="Keywords4"></Keywords> | ||
<Keywords name="Keywords5"></Keywords> | ||
<Keywords name="Keywords6"></Keywords> | ||
<Keywords name="Keywords7"></Keywords> | ||
<Keywords name="Keywords8"></Keywords> | ||
<Keywords name="Delimiters">00" 01\ 02" 03' 04\ 05' 06` 07 08` 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords> | ||
</KeywordLists> | ||
<Styles> | ||
<WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" /> | ||
<WordsStyle name="FOLDEROPEN" styleID="12" fgColor="FFFF00" bgColor="FFFFFF" fontName="" fontStyle="0" /> | ||
<WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="0B243B" bgColor="FFFFFF" fontName="" fontStyle="0" /> | ||
<WordsStyle name="KEYWORD1" styleID="5" fgColor="AA0000" bgColor="FFFFFF" fontName="" fontStyle="1" /> | ||
<WordsStyle name="KEYWORD2" styleID="6" fgColor="AA0000" bgColor="FFFFFF" fontName="" fontStyle="1" /> | ||
<WordsStyle name="KEYWORD3" styleID="7" fgColor="AA0000" bgColor="FFFFFF" fontName="" fontStyle="0" /> | ||
<WordsStyle name="KEYWORD4" styleID="8" fgColor="A00000" bgColor="FFFFFF" fontName="" fontStyle="0" /> | ||
<WordsStyle name="COMMENT" styleID="1" fgColor="AAAAAA" bgColor="FFFFFF" fontName="" fontStyle="0" /> | ||
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="AAAAAA" bgColor="FFFFFF" fontName="" fontStyle="0" /> | ||
<WordsStyle name="NUMBER" styleID="4" fgColor="A52A2A" bgColor="FFFFFF" fontName="" fontStyle="0" /> | ||
<WordsStyle name="OPERATOR" styleID="10" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" /> | ||
<WordsStyle name="DELIMINER1" styleID="14" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" /> | ||
<WordsStyle name="DELIMINER2" styleID="15" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" /> | ||
<WordsStyle name="DELIMINER3" styleID="16" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" /> | ||
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="COMMENTS" fgColor="AAAAAA" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="LINE COMMENTS" fgColor="AAAAAA" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="NUMBERS" fgColor="A52A2A" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="KEYWORDS1" fgColor="AA0000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /> | ||
<WordsStyle name="KEYWORDS2" fgColor="AA0000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /> | ||
<WordsStyle name="KEYWORDS3" fgColor="AA0000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="KEYWORDS4" fgColor="A00000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="OPERATORS" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /> | ||
<WordsStyle name="FOLDER IN CODE1" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /> | ||
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="DELIMITERS1" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="DELIMITERS2" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="DELIMITERS3" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | ||
</Styles> | ||
</UserLang> | ||
<!-- </NotepadPlus> --> |