Scilab Website | Contribute with GitLab | Scilab Community | ATOMS toolboxes
Scilab Online Help
2027.0.0 - Русский


scinotes

Scinotes: Embedded Scilab text editor

Syntax

scinotes()
scinotes(file)
scinotes([file1, file2])
scinotes(file, line_number)
scinotes(file, line_number, macro_name)
scinotes([file1, file2], [line_number1, line_number2])
scinotes(file, 'readonly')
scinotes(file, ['indent','trailing','quote'])
scinotes([file1, file2], 'readonly')
scinotes([file1, file2], ['indent','trailing','quote'])

Arguments

file

a string, the file to be opened.

[file1, file2]

a matrix of string, files to be opened.

line_number

An integer, the number of the line to be highlighted at the opening of the file.

macro_name

a string, the line number would be relative to the definition of the function macro_name

[line_number1, line_number2]

a matrix of integer, each opened file will have its corresponding line highlighted.

Description

Scinotes is an embedded Scilab text editor.

It can be started with a fresh text buffer pressing the "Editor" button on top of the main Scilab window, or from Scilab command line with the instruction editor(), or it can open specific files if invoked with any of the syntaxes above (without any parameters, it opens editor with a blank file).

The same invocation adds further files to an already opened Editor.

With the option 'readonly', files are opened in read-only mode so they cannot be modified.

With the options 'indent', 'quote' or 'trailing', the editor will not be opened and the file(s) will be treated consequently to the actions. The actions are the following:

  • The action 'indent' will indent correctly the file.

  • The action 'trailing' will remove the trailing white spaces.

  • The action 'quote' will replace all simple quoted strings by double quoted ones.

One or several actions can be used at the same time, e.g. 'trailing' or ['indent','quote'].

Keyboard shortcuts are defined for most possible editing actions and reported by the menu entries.

Scinotes can be started in the following ways :

  • By the menu Applications. Choose Applications => Editor

  • From the command line:

    • scinotes()

    • scinotes(file)

    • scinotes([file1, file2])

    • scinotes(file, line_number)

    • scinotes([file1, file2], [line_number1, line_number2])

Menus and Shortcuts

The shortcuts below are the default ones. On macOS, Ctrl is replaced by Cmd. All of them can be customized in the Shortcuts section of the Scilab preferences.

  • Menu File

    Command

    Shortcut

    Description

    NewCtrl+N

    Open a new empty file

    OpenCtrl+O

    Open an existing file

    Open recent

    Reopen a recently opened file

    Working directories

    Add or remove favorite directories

    Open file in ...

    Open a file located in the current or in a favorite directory

    Save file in ...

    Save the file in the current or in a favorite directory

    ReloadCtrl+Shift+R

    Reload the file from the disk

    Restore opened files on start-up

    Reopen at start-up the files opened at the end of the previous session

    Open function source fileCtrl+Shift+O

    Open the source file of the function under the caret

    Open URLCtrl+U

    Open the URL under the caret

    SaveCtrl+S

    Save the file

    Save asCtrl+Shift+S

    Save the file under a new name

    Save All

    Save all the opened files

    Overwrite

    Save the file even if it has been modified on the disk

    Export

    Export the file to HTML, PDF, PNG, ...

    Page Setup

    Setup the page for printing

    Print PreviewCtrl+Shift+P

    Open a print preview window

    PrintCtrl+P

    Print the file

    CloseCtrl+W

    Close the file

    Close All

    Close all the files

    Close All But This

    Close all the files except the current one

    Exit ScinotesCtrl+Q

    Close the editor

  • Menu Edit

    Command

    Shortcut

    Description

    UndoCtrl+Z

    Undo the last action

    RedoCtrl+Y

    Redo the last undone action

    CutCtrl+X

    Cut the selection

    CopyCtrl+C

    Copy the selection

    Copy as HTML with line numberCtrl+Shift+C

    Copy the selection as colorized HTML, with line numbers

    PasteCtrl+V

    Paste the clipboard content

    DeleteDelete

    Delete the selection

    Columns actions > Paste ColumnCtrl+Shift+V

    Paste the clipboard lines as a column at the caret position

    Columns actions > Repeat on the ColumnCtrl+Shift+Z

    Repeat the selection on the column

    Select AllCtrl+A

    Select the whole document

    Select current blockCtrl+B

    Select the block (function, loop, ...) containing the caret

    Search > Find/ReplaceCtrl+F

    Find and/or replace a text

    Search > Find NextCtrl+K

    Find the next occurrence

    Search > Find PreviousCtrl+Shift+K

    Find the previous occurrence

    Search > Incremental SearchF3

    Search while typing, in a bar at the bottom of the editor

    Search > Find filesCtrl+Shift+B

    Search files by name in a directory

    Search > Find word in filesCtrl+Shift+F

    Search a word in the files of a directory

    Search > Set anchorCtrl+M

    Set an anchor on the current line

    Search > Go to next anchorCtrl+Shift+<

    Move the caret to the next anchor

    Search > Go to previous anchorCtrl+<

    Move the caret to the previous anchor

    Search > Remove anchorCtrl+Shift+M

    Remove the anchor of the current line

    Search > Code NavigatorCtrl+G

    Navigate through functions and anchors, or go to a given line

  • Menu Format

    Command

    Shortcut

    Description

    Shift RightTab

    Indent the selected lines

    Shift LeftShift+Tab

    Unindent the selected lines

    Correct IndentationCtrl+I

    Indent the selected lines according to the Scilab syntax

    Remove trailing spacesCtrl+Shift+W

    Remove the trailing white spaces

    Generate comments for help_from_sciCtrl+Shift+G

    Insert a help comments template for the function (see help_from_sci)

    Comment SelectionCtrl+D

    Comment the selected lines

    Uncomment SelectionCtrl+Shift+D

    Uncomment the selected lines

    Change the case > Make Selection LowercaseCtrl+J

    Convert the selection to lowercase

    Change the case > Make Selection UppercaseCtrl+Shift+J

    Convert the selection to uppercase

    Change the case > Capitalize SelectionCtrl+Shift+A

    Capitalize the selection

    Single to double quote strings

    Replace all simple quoted strings by double quoted ones

  • Menu Options

    Command

    Shortcut

    Description

    Current file encoding

    Encoding of the file (default is UTF-8)

    Line Endings

    End of line characters of the file (Windows, Unix, Mac)

    Preferences > Set font

    Font settings

    Preferences > Set colors

    Color settings

    Preferences > Scinotes General settings

    Open the SciNotes preferences

    Auto-completion on > (, [, ...Ctrl+H

    Automatically close parentheses, brackets and quotes

    Auto-completion on > if, function, ...Ctrl+Shift+H

    Automatically close blocks (end, endfunction, ...)

    Line numbering

    Hide the line numbers, or display them as normal or local (relative to the current function) numbering

  • Menu Window

    Command

    Shortcut

    Description

    Copy tab in new windowCtrl+Shift+T

    Open the current file in a new SciNotes window

    Detach tab in new windowCtrl+Shift+X

    Move the current tab to a new SciNotes window

    Copy selection in a new tab

    Create a new file containing the selection

    Split View

    Split the current view in two columns or in two rows

    Assistant

    Show or hide the AI assistant panel (see scinotes_assistant)

  • Menu Execute

    Command

    Shortcut

    Description

    ... file with no echoCtrl+Shift+E

    Execute the file without displaying its instructions in the console

    ... file with echoCtrl+L

    Execute the file, displaying its instructions in the console

    ... the selection with echoCtrl+E

    Execute the selection, or the text until the caret when nothing is selected

    Save and executeCtrl+F5

    Save the file, then execute it

    Save and execute all files

    Save all the files, then execute them

  • Menu Debug (see scinotes_debugger)

    Command

    Shortcut

    Description

    Debug or resumeF5

    Start debugging the file, or resume the execution

    PauseF6

    Pause the execution

    Step OverF10

    Execute the current line

    Step InF11

    Enter the function called on the current line

    Step OutShift+F11

    Run until the current function returns

    Run to CursorCtrl+F10

    Run until the line of the caret

    Stop DebuggingShift+F5

    Abort the debugging session

    Toggle BreakpointF9

    Set or remove a breakpoint on the current line

    Enable All Breakpoints

    Enable all the breakpoints

    Disable All Breakpoints

    Disable all the breakpoints

    Remove All Breakpoints

    Remove all the breakpoints

  • Menu ?

    Command

    Shortcut

    Description

    Scinotes helpF1

    Open this help page

    Help on ...Ctrl+F1

    Open the help page of the keyword under the caret, or of the selection

    AboutShift+F1

    Display information about SciNotes

  • Other shortcuts

    Command

    Shortcut

    Description

    CompleteCtrl+Space

    Complete the word under the caret (also in the contextual menu)

    Next tabCtrl+Page Down

    Go to the next tab

    Previous tabCtrl+Page Up

    Go to the previous tab

    Next paragraphCtrl+Down

    Move the caret to the next paragraph

    Previous paragraphCtrl+Up

    Move the caret to the previous paragraph

Remarks

Document :

The default text colorization is the Scilab's syntax colorization.

The auto-indent mode indent a line according to Scilab's syntax (after a return action).

Examples

// editor without parameters
scinotes();

// editor with a file name
scinotes('SCI/modules/time/macros/datenum.sci');

// editor with a matrix of files name
scinotes(['SCI/modules/time/macros/datenum.sci','SCI/modules/time/macros/datevec.sci']);

// editor with a file name and the line number to highlight
scinotes('SCI/modules/time/macros/datenum.sci', 5);

// editor with a file name and the line number to highlight
scinotes('SCI/modules/time/macros/datenum.sci', 8, 'datenum');

// editor with a matrix of files name and the corresponding matrix of lines to highlight
// the files name matrix and the lines to highlight matrix should have the same size
scinotes(['SCI/modules/time/macros/datenum.sci','SCI/modules/time/macros/datevec.sci'], [5,10]);

Indent some Scilab code

f=TMPDIR + "/file_to_correct.sci";
mputl(["a=''abcdef''                                    ";
       "if a==1";
       "   b=1+""abcdef''         ";
       "            c=2";
       " d=3            ";
       "                            if                              ";
       "a=''abcdef""""""";
       "           end";
       "                end              "], f);

scinotes(f, ["indent" "trailing" "quote"]);

// Show the results
write(%io(2), mgetl(f))
--> write(%io(2),mgetl(f))
a="abcdef"
if a==1
    b=1+"abcdef"
    c=2
    d=3
    if
        a="abcdef"""
    end
end

See Also

  • edit — функция редактирования
  • editvar — Scilab variable editor
  • ged — Interactive edition of hierarchical properties of graphic objects
  • ieditor — Interactive plot editor
  • console — Сочетания клавиш, определённые в командном окне
  • scinotes_debugger — SciNotes debugger: breakpoints, step by step execution and values of the variables in the editor
  • scinotes_assistant — SciNotes AI assistant: chat with an AI coding agent that reads your code, runs it in Scilab and edits your files

History

ВерсияОписание
5.4.1 ['indent','trailing','quote'] options added.
Report an issue
<< editor Script editor scinotes_assistant >>

Copyright (c) 2022-2026 (Dassault Systèmes S.E.)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 15 13:05:41 CEST 2026