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

Notepad++ functions & arguments completion for Scilab

Completion of functions & arguments list + syntax colorization with Notepad++ for Scilab
(5184 downloads for this version - 30697 downloads for all versions)
Details
Version
4.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.5
Creation Date
December 29, 2011
Description
            UPDATED for Scilab 5.4.0a    .sce .sci .tst .start files supported
Functions and related synopses of 3 main ATOMS modules SIVP, plotlib and lycee
are included.
----------
The free high level Notepad++ external editor can propose an advanced feature
(unavailable 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.

HOW TO SET Notepad++ to autocomplete Scilab functions and args:
--------------------
In Notepad++ : 
In the menu Settings => Preferences => Tab: Back-up/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 (3)
[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.
[518.61 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.4.0a), 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 (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 (6)     Leave a comment 
Comment from Rafael Guerra -- February 19, 2012, 03:02:02 PM    
Hello,
I am using Windows 7 64 bits and I have downloaded scilab.xml into C:\Program files
(x86)\Notepad++\plugins\APIs). After launching Notepad++, the Scilab language is not
listed to allow formating text.
Please advise.
Thanks and regards,
Rafael
Answer from Samuel Gougeon -- February 19, 2012, 06:35:50 PM    
> Hello,
> I am using Windows 7 64 bits and I have downloaded scilab.xml into C:\Program files
> (x86)\Notepad++\plugins\APIs). After launching Notepad++, the Scilab language is not
> listed to allow formating text.
> Please advise.

Hello Rafael,

Notepad++ detects the language according to the file extension defined in the
UserDefineLang.xml, before using the related completion API. If you have installed
only scilab.xml, you won't get neither the syntax colorization nor the completion.
Have you instal both files as described in the descriptionsabove?

Samuel
Comment from Rafael Guerra -- February 19, 2012, 09:45:44 PM    
Samuel,
I am sorry as, indeed, I had only downloaded one of the files.
After storing 'UserDefineLang.xml' in  'C:\Users\my_user_name\AppData\Roaming\Notepad++'
it worked like a charm.
Many thanks!
Rafael
Comment from Relative Biglos -- June 25, 2012, 10:10:50 AM    
Dear Samuel,

Is it possible to run scilab with notepad++ (menu run commands)?

And if possible, how can i do that?

Thank you,
Have a nice day,

Bastien - windows7 - scilab 5.3.3
Answer from Samuel Gougeon -- June 26, 2012, 11:15:42 PM    
Hello Bastien,

> Is it possible to run scilab with notepad++ (menu run commands)? 
> And if possible, how can i do that?

It is rather a Notepad++ question, and a very relevant one.
IMO, it should be possible... with some work.
Here are the Notepad++ pointers that i have found around this topic:

* A Np++ user has released a code to execute into R 
  some lines selected in the Np++editor:
  http://sourceforge.net/projects/npptor/files/ 
  Some equivalent for Scilab would answer to your need.

* There is a RunMe plugin :
  https://sites.google.com/site/fstellari/nppplugins => See RunMe
  Moreover, the latest release of this plugin looks not compatible
  with the lastest Notepad++
  How to use RunMe is not clear to me 

* The last potentially useful plugin that i have found is 
   http://sourceforge.net/projects/npp-plugins/files/NppExec/ 

It is almost clear that it should be possible to send from Np++
content to a NEW Scilab session. But targetting an open one is 
something else. The R example might likely be adapted (i have
tested it with R, without success :/ )

Hoping that this could help

Regards
Samuel
Comment from Relative Biglos -- June 27, 2012, 09:59:06 AM    
Dear Samuel!

Thank you for all the information.

Here is the command line to run scilab with NppExec (Npp v5.1.4)

"C:\Program Files\scilab-4.1.1\bin\scilex" -nw -f MyScript.sce

(this line runs scilab in batch mode)

I think using NppExec is the better and simplest solution!

Have a nice coding night!!!
Bastien

Of course, you have to change the current directory in the scilab.start file.
Comment from Florian Le Bourdais -- October 10, 2012, 10:29:44 AM    
Using the NppExec plugin, you can load a file into Scilab by doing the following:

Press F6 to bring up the NppExec window
Type the following:

cd $(CURRENT_DIRECTORY)
"C:\Program Files\scilab-5.4.0\bin\Scilex.exe" -f $(FILE_NAME)

Press Ok button.
This should open a window called console in Notepad++ and execute the code in your file.
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.