0

rake ファイルの編集に Notepad++ を使用していますが、関数リスト プラグインを使用できるようにしたいと考えています。

オンラインで構文解析規則を見つけることができませんでした。また、「言語構文解析規則」ダイアログはあまり明確に文書化されていません。

メソッドを次のリストに解析していますが、タスクも表示したいと思います。

Function Begin:  [ \t]*def[ \t]+
Function List Name: [a-zA-Z0-9_\.]*

これはあまりきれいではなく、? で終わる関数をキャプチャしません。または!、しかし、それは開始です。

機能していない私のタスクルールは次のとおりです。

Function Begin: [ \t]*task[ \t]+
Function List Name: :[a-zA-Z0-9_\.]*
Function End: [ \t]+do

どんな提案でも大歓迎です。

ありがとう

4

4 に答える 4

1

バージョン 6.4 以降、プラグインは必要ありません。新しい関数リスト機能をチェックしてください: http://notepad-plus-plus.org/features/function-list.html

言語サポートが予定されています。おそらくここで尋ねると役立つでしょう: https://sourceforge.net/p/notepad-plus/discussion/331753/thread/b9d2fe00/

于 2013-08-11T11:59:38.447 に答える
1

これが私のルールです。まだ完璧ではありません。サブグループの設定方法がわかりません。

<Language name="Ruby" imagelistpath="">
    <CommList param1="#" param2="" />
    <CommList param1="//" param2="" />
    <CommList param1="/\*" param2="\*/" />
    <Group name="MODULE" subgroup="" icon="0" child="0" autoexp="0" matchcase="1" fendtobbeg="" bbegtobend="" keywords="">
        <Rules regexbeg="^[\s\t]*module\s+" regexfunc="[\w]+" regexend="" bodybegin="" bodyend="" sep="" />
    </Group>
    <Group name="CLASS" subgroup="" icon="0" child="0" autoexp="0" matchcase="1" fendtobbeg="" bbegtobend="" keywords="">
        <Rules regexbeg="^[\s\t]*class\s+" regexfunc="[\w]+" regexend="" bodybegin="" bodyend="" sep="" />
    </Group>
    <Group name="FUNCTION" subgroup="" icon="0" child="0" autoexp="0" matchcase="1" fendtobbeg="" bbegtobend="" keywords="">
        <Rules regexbeg="^[\s\t]*def\s+" regexfunc="[\w\?!\.=]+" regexend="" bodybegin="" bodyend="" sep="" />
    </Group>
</Language>
于 2011-09-10T01:13:01.930 に答える
1

FunctionListRules.xmlおそらく、ファイルに追加できる以下の設定を使用できます。

<Language name="Ruby" imagelistpath="C:\Documents and Settings\king_cao\Application Data\Notepad++\plugins\config\C++.flb">
        <Group name="CLASS" subgroup="FUNCTION" icon="1" child="11" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="" keywords="">
            <Rules regexbeg="^class\s+" regexfunc="[\w_]+" regexend="" bodybegin="" bodyend="^end$" sep="" />
        </Group>
        <Group name="FUNCTION" subgroup="" icon="9" child="17" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="" keywords="">
            <Rules regexbeg="^[\s\t]+def\s+" regexfunc="[\w_]+" regexend="" bodybegin="" bodyend="^[\s\t]+end$" sep="" />
        </Group>
        <Group name="GlobalFunction" subgroup="" icon="9" child="17" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="" keywords="">
            <Rules regexbeg="^def\s+" regexfunc="[\w_]+" regexend="" bodybegin="" bodyend="^end$" sep="" />
        </Group>
        <Group name="MODULE" subgroup="FUNCTION" icon="8" child="11" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="" keywords="">
            <Rules regexbeg="^module\s+" regexfunc="[\w_]+" regexend="" bodybegin="" bodyend="^end$" sep="" />
        </Group>
</Language>
于 2010-07-29T03:03:23.383 に答える