Project

General

Profile

Actions

Notepad++ » History » Revision 2

« Previous | Revision 2/4 (diff) | Next »
iri, 12/11/2013 03:23 PM


Notepad++

Notepad++ is a free text editor on MS Windows only.

Syntax highlighting

For the packages files (pkg).
Edit the AppData\Notepad++\userDefineLang.xml file (create it if it does'nt exist).
Add it this at the end :

<NotepadPlus>
    <UserLang name="Scol" ext="pkg" udlVersion="2.1">
        <Settings>
            <Global caseIgnored="no" allowFoldOfComments="no" 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="Comments">03/* 04*/ 00// 01 02</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">fun typeof typedef var struct proto defcom defcomvar ;;</Keywords>
            <Keywords name="Keywords2">set let -&gt; &lt;- mutate in</Keywords>
            <Keywords name="Keywords3">if else then while do</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&apos; 01 02&apos; 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" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="NUMBERS" fgColor="FF8040" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS1" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS2" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS3" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS4" fgColor="000000" 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="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" 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="808080" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS3" fgColor="000000" 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>

or, for an old NPP version :

<NotepadPlus>
<UserLang name='Scol' ext='pkg'>
<Settings>
<Global caseIgnored='no' />
<TreatAsSymbol comment='no' commentLine='no' />
<Prefix words1='no' words2='no' words3='no' words4='no' />
</Settings>

<KeywordLists>
<Keywords name='Delimiters'>'00'00</Keywords>
<Keywords name='Folder+'></Keywords>
<Keywords name='Folder-'></Keywords>
<Keywords name='Operators'></Keywords>
<Keywords name='Comment'>1/* 2*/ 0//</Keywords>
<Keywords name='Words1'>fun typeof typedef var struct proto defcom exec match with ;;</Keywords>
<Keywords name='Words2'>set let -> <- mutate in</Keywords>
<Keywords name='Words3'>if else then while do</Keywords>
<Keywords name='Words4'></Keywords>
</KeywordLists>
<Styles>
<WordsStyle name='DEFAULT' styleID='11' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='FOLDEROPEN' styleID='12' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='FOLDERCLOSE' styleID='13' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='KEYWORD1' styleID='5' fgColor='FF0000' bgColor='FFFFFF' fontName='' fontStyle='1' />
<WordsStyle name='KEYWORD2' styleID='6' fgColor='800000' bgColor='FFFFFF' fontName='' fontStyle='1' />
<WordsStyle name='KEYWORD3' styleID='7' fgColor='0000FF' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='KEYWORD4' styleID='8' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='COMMENT' styleID='1' fgColor='008000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='COMMENT LINE' styleID='2' fgColor='008000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='NUMBER' styleID='4' fgColor='FF8040' bgColor='FFFFFF' fontName='' fontStyle='1' />
<WordsStyle name='OPERATOR' styleID='10' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='DELIMINER1' styleID='14' fgColor='808080' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='DELIMINER2' styleID='15' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='DELIMINER3' styleID='16' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
</Styles>
</UserLang>
</NotepadPlus>

Relaunch Notepad++ if any.

The code completion

Download the scol_api_notepadpp.7z file and extract the content in the plugins/api subdirectory of the installation folder (by default C:\Program Files\Notepad++ or C:\Programs\Notepad++)

Go to Settings menu, next Preferences and choose Save / Completion tab. Configure it at your convenience. Validate and relaunch Notepad++.

The FunctionList plugin

This plugin displays and sorts functions, types, constructors and variables in the side panel.

Download the plugin from SourceForge
Copy the dll in the Plugins subfolder of the installation directory. Perform a backup if any.
Copy all other files in AppData\Notepad++\Plugins\Config or in AppInstall\Notepad++\plugins\config\, especially FunctionListRules.xml
Edit the FunctionListRules.xml file and add it these line before just the last \"\"

<Language name='Scol' imagelistpath=''>
<CommList param1='//' param2='' />
<CommList param1='/\*' param2='\*/' />
<Group name='FUNCTION' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
    <Rules regexbeg='^[ \t]*fun[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
</Group>
<Group name='TYPEOF' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
    <Rules regexbeg='^[ \t]*typeof[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
</Group>
<Group name='VAR' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
    <Rules regexbeg='^[ \t]*var[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
</Group>
<Group name='PROTO' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
    <Rules regexbeg='^[ \t]*proto[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
</Group>
<Group name='STRUCT' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
    <Rules regexbeg='^[ \t]*struct[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
</Group>
<Group name='TYPEDEF' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
    <Rules regexbeg='^[ \t]*typedef[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
</Group>
<Group name='DEFCOM' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
    <Rules regexbeg='^[ \t]*defcom[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
</Group>
<Group name='DEFCOMVAR' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
    <Rules regexbeg='^[ \t]*defcomvar[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
</Group>
</Language>

If the plugin doesn't work, try to uncheck "Compacter le menu langage" présent dans le menu Paramétrages > Préférences, onglet Menu langages /Tabulations.

Updated by iri over 10 years ago · 2 revisions