Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | ATOMS
File : Details
Please login or create an account

Notepad++ styles for Scilab 5.4 syntax colorization + functions completion & args reminder

keywords colorization, functions completion & args reminder with Notepad++ for Scilab and ATOMS
(5524 downloads for this version - 30697 downloads for all versions)
A more recent valid version with binaries for Scilab exists: 6.1
Samuel Gougeon
Samuel Gougeon
Supported Scilab Version
Creation Date
October 31, 2012
            Built with & Updated for Scilab 5.4.0
Works for any Scilab release.
.sce .sci .tst .start files are considered as Scilab ones.

In addition to Scilab 5.4 ones, functions and their related calling sequences
are included for the following ATOMS modules among most used ones:
 * Advanced Neural Network (ANN)
 * apifun
 * Image Processing Design (IPD)
 * Lycee (educational, pour les lves franais)
 * Matrix Market
 * Metanet
 * Plotting library (for former Matlabers) (plotlib)
 * Scilab Image & Video Processing (SIVP)
 * serial (RS-232 communications)
 * socket (IP communications)
 * Sound files management (sndfile)
 * Time Frequency toolbox (stftb)

 * Colorization and completions occur for these ATOMS modules even if the 
   modules are not installed in Scilab. This will help you preventing
   any potential conflicts with your own variables and functions.

 * ANN toolbox: Only syntax colorization is supported. Completion is not 
       provided for this module (its XML help files do not comply with Scilab
       5.4.0 standard)

 * plotlib: has several functions with same names as native Scilab functions
        (plot, subplot...). => arguments completion is provided for both
        Scilab and plotlib syntaxes ; plotlib syntaxes are then displayed at
        the bottom of the list of possible syntaxes.

The free high level Notepad++ external editor can propose an advanced feature
(unavailable in the embedded Scilab editor): All calling sequences of a function
-- also called synopses -- can be displayed when typing the opening
"(". This feature is enabled by the scilab.xml file provided
here-below. It greatly helps in reminding on-the-fly the expected lists of

scilab.xml also enables completion of function names through the <em>full
list</em> of functions for Scilab and some ATOMS modules.

Other Notepad++ features such as syntax colorization, folding / unfolding of
block of statements, parentheses or brackets or braces matching, etc.. are
defined and proposed for Scilab through the UserDefineLang.xml file.
The two main subsets of reserved Scilab keywords (built-in functions, and
macros) are extensively given for syntax highlightment, including undocumented
utility functions.

REMARKS about syntax parsing rules
* The single quote _'_ cannot be declared as an alternative string delimiter.
Otherwise, Notepad++ would parse the ' transposition operator as the opening of
a string, making a big part of the following code wrongly parsed.

HOW TO SET Notepad++ to autocomplete Scilab functions and parameters:
In Notepad++ : 
In the menu Settings => Preferences => Tab: Auto-completion:
In the Auto-completion frame, the only item that should NOT be checked is
"Word completion".

Management of files provided through this module is described below.
Files (4)
[15.04 kB]
Miscellaneous file
Samples of Notepad++'s screenshots illustrating the completion, display of
simple or multiple calling sequences, syntax colorization, and blocks folding
for Scilab.
[660.57 kB]
Miscellaneous file
scilab.xml enables the completion of Scilab functions and the display of their
calling sequences (when typing the opening parenthesis).

scilab.xml must be stored in the ~\plugins\APIs\scilab.xml Notepad++
installation directory (most often in C:\Program files\Notepad++\plugins\APIs)
scilab.xml is built with the synopses extracted from the Scilab official help

The extensive set of ~2900 Scilab calling sequences is proposed. In addition, 
calling sequences for included ATOMS modules are also provided in this file.

For each completed function, all allowed calling sequences are displayed.
[44.48 kB]
Miscellaneous file
[DEPRECATED] (syntax colorization for Notepad++ < 2013-05-01)

Please download the file UserDefineLang_NEW.xml below instead

[46.61 kB]
Miscellaneous file
UserDefineLang.xml : [UPGRADED] for NOTEPAD++ > 2013-05-01
                     Syntax colorization for Notepad++
After downloading this file, please RENAME it UserDefineLang.xml
File defining extended sets of all reserved Scilab keywords (for Scilab 5.4.0),
rules and styles for Scilab syntax highlighting.
UserDefineLang.xml must be stored in the user profile (%appdata%\notepad++\ ,
often = C:\Documents
and settings\your_login\Application Data\Notepad++\UserDefineLang.xml), or at
the root of the Notepad++ installation directory (before using Notepad++ for the
first time, for all forthcoming Notepadd++ users).

Your own UserDefineLang.xml file may contain rules for customized languages
other than Scilab. This is why it is preferable to properly import this release
for Scilab with the Import command (Menu Settings => Import), or to edit it and
copy/paste the <="" userlang=""> block for Scilab in it.
News (0)
Comments (4)     Leave a comment 
Comment from Jason Nicholson -- December 25, 2012, 07:59:48 AM    
I am confused on how to get this to work in Notepad++.  I put scilab.xml into
Files (x86)\Notepad++\plugins\APIs\scilab.xml".  I used the
"View-->User-Defined Dialogue."  
I then went to "Import..." and imported the "UserDefineLang.xml." What
am I missing?
Comment from Christopher Murray -- February 1, 2013, 04:06:06 PM    
Did you use the language drop down menu and select 'scilab'?  That is what I did and it 
started working immediately.
Comment from Adrien Vogt-schilb -- May 2, 2013, 11:02:29 AM    
Hi Samuel

Npp has updated the way it parses keywords. Folding keywords should now be defined as
"type 2 (separator needed). Otherwise, words like "format" will be parsed as
keywords, as
they start with "for".

Best regards
Answer from Samuel Gougeon -- May 2, 2013, 09:27:50 PM    
Hello Adrien,
Thanks for the alert. I will upgrade my Notepad++ to test, and i will have a look to this
for the next update of this fileset. Thanks again.
Best regards
Answer from Samuel Gougeon -- November 10, 2013, 03:29:22 AM    
Hi Adrien,

UserDefineLang.xml has been upgraded for the new Notepad++ implementation.

In addition to your indication, 
* "/" is now defined among operators without being confused with "//"
* case, else, elseif, and catch are now handled to be foldable

This fileexchange file set will be updated when the stable Scilab 5.5.0 will be released.

Best regards
Comment from Andreas Geissler -- December 10, 2013, 03:37:55 PM    
Works perfectly (UserDefinedLanguage_New) with Notepad++ v6.4.3
Really nice!
Leave a comment
You must register and log in before leaving a comment.
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.