Project

General

Profile

Actions

Notepad++ » History » Revision 1

Revision 1/4 | Next »
iri, 09/24/2012 09:35 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'>
<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 11 years ago · 1 revisions