Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | ATOMS
File : Details
Login with GitLab

Code colorization & completion for Scilab scripts within Notepad++

Syntax colorizer + functions completion & args reminder for Scilab 5.4 scripts within Notepad++
(5489 downloads for this version - 33640 downloads for all versions)
Details
Version
1.0
A more recent valid version with binaries for Scilab exists: 6.1
Author
Samuel Gougeon
Maintainer
Samuel Gougeon
Category
License
Supported Scilab Version
5.3
Creation Date
March 23, 2011
Description
            The external, free, high level Notepad++ editor can propose an advanced feature
not available in the embedded Scilab editor: All calling sequences of a function
can be displayed when typing the opening "(". This feature is enabled
by the scilab.xml file. It greatly helps in reminding on-the-fly the expected
lists of arguments.

scilab.xml also enables completion of function names through the <em>full
list</em> of Scilab's functions.
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
----------------------------------
* "/" cannot be declared as an operator because Notepad++ couldn't
distinguish it from "//" for comments.
* The keywords "then", "else", "elseif",
"case", or "catch" are highlighted like other ones, but
Notepad++ does not allow to fold / unfold sub-blocks opened with them, because
they have no specific ending words. 
* 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.
            
Files (3)
[15.04 kB]
Screenshot
Samples of Notepad++'s screenshots illustrating the completion, display of
simple or multiple calling sequences, syntax highlightment, and blocks folding
for Scilab.
[490.70 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
pages.
The extensive set of ~2900 Scilab calling sequences is proposed.
For each completed function, all allowed calling sequences are displayed.

[30.71 kB]
Miscellaneous file
UserDefineLang.xml : File defining extended sets of all reserved Scilab keywords
(for Scilab 5.3.1), rules and styles for Scilab syntax highlighting.
UserDefineLang.xml must be stored at the root of the Notepad++ installation
directory (for all Notepadd++ users), or in the user profile (often C:\Documents
and settings\your_login\Application Data\Notepad++\UserDefineLang.xml).
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  block for Scilab in it.
News (0)
Comments (3)     Leave a comment 
Comment from Jason Nicholson -- April 4, 2011, 08:42:00 PM    
Great!  Thanks for this!
Comment from javier carrero -- June 1, 2011, 06:52:27 PM    
Congratulations, great job! A couple of comments/questions

-The Import command (Menu Settings => Import) doesn't work for UserDefineLang.xml.
Instead, at least in NPP 5.8.7 it is necessary to use the Import button included in Menu
=> View => User define dialogue... 

-I copied the scilab.xml file in the same location of the other APIs but I don't have
autocompletion with "(" ¿is it necessary an additional step?

-A suggestion for future releases: making the scilab theme compatible with dark background
styles 
Answer from Samuel Gougeon -- June 1, 2011, 11:00:05 PM    
Hello Javier,

> Congratulations, great job! 
You are welcome. Do not hesitate to quote the package :-)

>A couple of comments/questions
> 
> -The Import command (Menu Settings => Import) doesn't work for UserDefineLang.xml.
> Instead, at least in NPP 5.8.7 it is necessary to use the Import button included in
> Menu => View => User define dialogue... 

I use NPP 5.9. Settings => Import displays 2 sub-menus, namely: Import plugin(s) |
Import
theme(s). I must confess that i have never tried through menus. I did it by hand.
When i will upgrade the package for the current Scilab 5.3.2 release, i will try to
load it as a normal user, from scratch.
 
> -I copied the scilab.xml file in the same location of the other APIs but I don't have
> autocompletion with "(" ¿is it necessary an additional step?

I am wondering about matching between the name one gives to the style and the name of the
plugin file. I will try to unmatch both to see what append.

> -A suggestion for future releases: making the scilab theme compatible with dark
background styles
You are free to modify each feature of the style. The most important part of the package
is to provide the lists of Scilab functions, keywords, operators and simple features ;-)
Then, recolor them as you wish :-)

Thank you for your comments
Samuel
Comment from javier carrero -- June 13, 2011, 02:42:56 AM    
Finally I realized the problem with autocompletion, it seems that notepad disables
autocompletion by default, therefore it is necessary to enable it from the dialog box in
Settings/Preferences/Backup/Autocompletion, after copying the xml file in the APIs folder.
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
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.