1
0
mirror of https://github.com/golang/go synced 2024-11-21 22:04:39 -07:00

misc/notepadplus: add Function List support

Fixes #6045.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12463043
This commit is contained in:
ChaiShushan 2013-08-05 08:24:55 -07:00 committed by Brad Fitzpatrick
parent c43cca7d92
commit 6abbbcdc75
2 changed files with 53 additions and 0 deletions

View 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

View File

@ -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> -->