From: ChaiShushan Date: Fri, 26 Jul 2013 22:12:42 +0000 (+1000) Subject: misc/notepadplus: use new User Defined Language system (UDL2) X-Git-Tag: go1.2rc2~931 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c44e483542b7b9d8954d896f32c82f89bc86d9fc;p=gostls13.git 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 --- diff --git a/misc/notepadplus/README b/misc/notepadplus/README index 000d31746d..06e3ef3e2d 100644 --- a/misc/notepadplus/README +++ b/misc/notepadplus/README @@ -1,8 +1,37 @@ -Given a Notepad++ installation at : +Notepad++ syntax highlighting +----------------------------- -1. Add the contents of userDefineLang.xml at \userDefineLang.xml - between ... - -2. Copy go.xml to \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 ... + 2. Restart Notepad++ + +Installing from Notepad++ zip/7z package + + 1. Given a Notepad++ installation at . + 2. Add the contents of userDefineLang.xml at \userDefineLang.xml + between ... + 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 . + 2. Copy go.xml to \plugins\APIs + 3. Restart Notepad++ + +Reference + + 1. http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Auto_Completion -3. Restart Notepad++ diff --git a/misc/notepadplus/userDefineLang.xml b/misc/notepadplus/userDefineLang.xml index 8561a4f11a..0c713ec9ef 100644 --- a/misc/notepadplus/userDefineLang.xml +++ b/misc/notepadplus/userDefineLang.xml @@ -1,36 +1,64 @@ - + - - - + + - "`0"` - - - ( ) [ ] { } ... . , ; _ & ^ % > < ! = + - * / | : - 1/* 2*/ 0// - 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 - - - + 00// 01 02 03/* 04*/ + + + + + + + + ( ) [ ] { } ... , ; & ^ % > < ! = + - * / | : + + + + + + + + + + + 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 + bool byte complex64 complex128 error float32 float64 int int8 int16 int32 int64 rune string uint uint8 uint16 uint32 uint64 uintptr true false iota nil + append cap close complex copy delete imag len make new panic print println real recover _ + + + + + + 00" 01\ 02" 03' 04\ 05' 06` 07 08` 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +