Wiki

This page contains information on how to get syntax highlighting and function list support in  Notepad++.

Syntax Highlighting

To add syntax highlighting support copy the UserLang node for Cobra from the userDefinedLanguage.xml file attached below.

Place this XML node in the userDefinedLang.xml file at

%appdata%\Notepad++\userDefineLang.xml

If this file does not exist then copy the entire file to the destination directory.

Note that the colors used are more geared towards themes with a darker background (the majority of them). This is so because the way user defined languages are handled at the moment is by explicitly setting the colors and not a class name. These colors might make it a bit hard to comfortably read text with the default theme, which has a background color of white.
To change your theme go to Settings >> Style Configurator.

For colors more suited to the default theme use the UserLang node for Cobra in the file userDefineLang-DefaultTheme.xml attached below.
Once again if the file userDefineLang.xml does not exist copy the entire file (userDefineLang-DefaultTheme.xml) and rename it to userDefineLang.xml.

Version 6.2 and Post

Notepad++ changed its Language for defining User Languages ( UDL1.0 -> UDL2.0) requiring a slightly different syntax file. Unfortunately the new UDL doesnt support folding on indent ( which the python lexer does).

So the options now (pending that support in the UDL parser) are: If you want code folding in cobra - you need to augment the Python description with the additional cobra keywords

Get the Style Config dialog up by selecting Settings >> Style Configurator, Select 'Python' in the 'Language' List and select 'KEYWORDS' in the Style list

  • add 'cobra' to the 'user ext.' box
  • add the additional cobra keywords 'cue pro get set shared extend sig test var catch' to the 'User defined keywords' text box
  • Press the 'Save and Close' bttton

If you can do without code folding use a new user defined config for 'Cobra'.

Download the file 'userDefineLang-Cobra-Post6.2.xml below.

  • select Language >> Define Your Language
  • In the dialog press the 'Import' button and load the downloaded file in the popup file dialog
  • You should see a cobra lang definition loaded, press the Close window button in the top rhs of the dialog.

You should now have cobra syntax coloring and a new language entry for 'Cobra' at the bottom of the 'Language' Menu.

FunctionList support

FunctionList is provided as a plugin for Notepad++ so first be sure to install the plugin. To install download the plugin from  http://sourceforge.net/projects/npp-plugins/files/, unzip, then copy the DLL to

%programfiles%\Notepad++\plugins
or
%programfiles(x86)%\Notepad++\plugins if installed to the x86 Program Files directory on 64-bit Windows.

Next, copy the Language node for Cobra found in the FunctionListRules?.xml file attached below. Place this XML node in the FunctionListRules?.xml file at

%appdata%\Notepad++\plugins\config\FunctionListRules.xml

If the file does not exist then copy the entire file to the destination directory.

See Also

Attachments