]> Cypherpunks repositories - gostls13.git/commitdiff
misc/notepadplus: add Function List support
authorChaiShushan <chaishushan@gmail.com>
Mon, 5 Aug 2013 15:24:55 +0000 (08:24 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 5 Aug 2013 15:24:55 +0000 (08:24 -0700)
Fixes #6045.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12463043

misc/notepadplus/README
misc/notepadplus/functionList.xml [new file with mode: 0644]

index 06e3ef3e2dc63f9ed8aef1a9e50f958ce5c1b953..fca4f5f09902e0e35928661884bff460eddd7c1c 100644 (file)
@@ -35,3 +35,25 @@ Reference
 
   1. http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Auto_Completion
 
+Notepad++ Function List
+-----------------------
+
+The functionList.xml uses the Function List Pane new feature,
+which needs Notepad++ v6.4 or higher.
+
+Installing from Notepad++ Installer
+
+  1. Add the contents of userDefineLang.xml at %APPDATA%\Notepad++\functionList.xml
+     between <associationMap> ... </associationMap> and <parsers> ... </parsers>
+  2. Restart Notepad++
+
+Installing from Notepad++ zip/7z package
+
+  1. Given a Notepad++ installation at <DIR>.
+  2. Add the contents of functionList.xml at <DIR>\functionList.xml
+     between <associationMap> ... </associationMap> and <parsers> ... </parsers>
+  3. Restart Notepad++
+
+Reference
+
+  1. http://notepad-plus-plus.org/features/function-list.html
diff --git a/misc/notepadplus/functionList.xml b/misc/notepadplus/functionList.xml
new file mode 100644 (file)
index 0000000..341af7b
--- /dev/null
@@ -0,0 +1,31 @@
+<!-- <NotepadPlus> -->
+       <!-- <functionList> -->
+               <!-- <associationMap> -->
+                       <association ext=".go" id="go"/>
+
+               <!-- </associationMap> -->
+               <!-- <parsers> -->
+                       <parser id="go" displayName="Go" commentExpr="((/\*.*?\*)/|(//.*?$))">
+                               <function
+                                   mainExpr="(^func\s+[\w]+)|(^func\s*\(\s*[\w]+\s+\*?\s*[\w]+\s*\)\s*[\w]+)"
+                                       displayMode="$className->$functionName">
+                                       <functionName>
+                                               <nameExpr expr="(((func)[\s][\w]+)|(\(\s*[\w]+\s+\*?\s*[\w]+\s*\)\s*[\w]+))"/>
+                                               <nameExpr expr="(((func)[\s][\w]+)|(\)\s*[\w]+))"/>
+                                               <nameExpr expr="(([\s][\w]+)|(\)\s*[\w]+))"/>
+                                               <nameExpr expr="[\w]+"/>
+                                       </functionName>
+                                       <className>
+                                               <nameExpr expr="\(\s*[\w]+\s+\*?\s*[\w]+\s*\)\s*[\w]+"/>
+                                               <nameExpr expr="\(\s*[\w]+\s+\*?\s*[\w]+\s*\)"/>
+                                               <nameExpr expr="[\w]+\s+\*?\s*[\w]+\s*\)"/>
+                                               <nameExpr expr="\*?\s*[\w]+\s*\)"/>
+                                               <nameExpr expr="[\w]+\s*\)"/>
+                                               <nameExpr expr="[\w]+"/>
+                                       </className>
+                               </function>
+                       </parser>
+
+               <!-- </parsers> -->
+       <!-- </functionList> -->
+<!-- </NotepadPlus> -->