scipad - Embedded Scilab text editor
Scipad is an embedded Scilab text editor written in TCL/TK. It can be started with the "Editor" button on top of the main Scilab window, or from Scilab command line with the instruction scipad() or scipad f .
The same invocation adds further files to an already opened scipad session. Scipad allows Windows like edition modes. Keyboard shortcuts are defined for most possible editing actions and reported by the menu entries.
Additionally, the following shortcuts are defined:
<F2> | Save file |
<F5> | Save file and run it into Scilab |
<F6>, <Control-F6> | Show next buffer |
<F7>, <Control-F7> | Show previous buffer |
<double-click mouse-button1> | Select word |
<triple-click mouse-button1> | Select line |
<Shift-Control-mouse-button1> | Open the source of the library function under the pointer |
<mouse-button2> | Paste selection |
<mouse-button3> | Popup edit menu, or debug menu if clicked during a debug session |
<Shift-mouse-button3> | Popup Execute menu |
<Control-mouse-button3> | Popup Options menu |
<Control-plus> | Increase the font size |
<Control-minus> | Decrease the font size |
The "Load Into Scilab" (Ctrl-lowercase-l) menu entry can be used to exec the file content into Scilab, while "Execute selection" (Ctrl-lowercase-y) passes the selected lines to the scilab shell using ScilabEval (i.e. execstr ).
Scipad 2.0 or later includes a debugger (for .sci files only). The user can:
At this point there are several possibilities for the user:
At any time during the debug, a watch window can be displayed on user request. It allows to monitor any variable value, or change a variable value during a breakpoint stop and relaunch execution with the modified value. The watch window also displays the calling stack.
After the end of the execution, the breakpoints are removed from Scilab (but kept in Scipad).
In its current development state the debugger works well with functions, i.e. pure .sci files. Support of .sce files or mixed .sce/.sci files has been foreseen but not yet implemented. That means that a .sce file will not crash Scipad, which is the very least, but more, once a feasible solution for debugging this type of files is figured out, it should be easy to add the functionality in the Scipad source code. Anyway, if actually a debug is required in a .sce, you should first convert it into a .sci function just by adding (output_vars)=function foo(input_vars) / endfunction and that's it. The absence of breakpoints management for .sce is therefore not such a major drawback.
global %scipad_language; %scipad_language="XX"
where XX stands for the code of the language. Such commands can be included, for instance, in the user .scilab file. Currently, the supported codes are: "de" (German) ,"eng" (English), "fr" (French), "it" (Italian), "no" (Norwegian), "se" (Swedish). Further languages can be added by creating the proper translation file and putting it in SCI/tcl/scipadsources/msg_files/. If you plan to do such a job and to contribute it to the community, please contact the current mantainers for detailed instructions.There is also a drag and drop feature for selected text within the Scipad window. Possible actions are move (just use mouse button-1) and copy (Control button-1).
Windows and linux-i386 binary versions of Scilab are currently shipped with Tkdnd. If not, here are some installation instructions:
Windows platforms: Download the full package (currently tkdnd-1.0a2.tar.gz), and uncompress it somewhere. Copy the content of lib\tkdnd and paste it into SCI\tcl\tk8.4\tkdnd. That's all!
linux-i386 platforms: Download the rpm package (currently tkdnd-1.0-b2.i386.rpm). Install it with rpm -U (may have to force --nodeps if it doesn't recognize an existing tcl installation). If you have a source version of Scilab and an installation of tcl-tk, check where they are installed (e.g. /usr/share/) and move the newly created directory /usr/lib/tkdnd1.0/ to there. If you have a binary version of Scilab, move tkdnd1.0/ to SCI/tcl/, where the supplied tcl-tk binaries are.
scipad SCI/scilab.star