Skip to content

Scintilla Editor Features

Shaina Sabarwal edited this page Aug 17, 2015 · 2 revisions

Syntax Highlighting & Editor Color schemes

One of the major features of Scintilla Editor of Openscad is syntax highlighting. Various themes are provided as Color Syntax Highlighting in the Preferences window - Editor of Openscad. The user can also add his own new syntax highlighting theme by adding a json file in the color-scheme/editor folder of Openscad code. https://github.com/openscad/openscad/tree/master/color-schemes/editor

Folding

Scintilla editor of Openscad provides code folding that allows the user to hide or reveal a block of script code. Folding is provided for the block of code starting with '{' or '[' and ending with '}' or ']' respectively. The multiline comments are also being folded.

Auto-Indentation

The block started with '{' and ending with '}' gets intended automatically.

Error Highlighting and Position Detection

The compilation error is highlighted in red and marked with a red circle at the left margin of the editor at the same line. The cursor is also positioned at the error position. In case of error location below than user's window's height, the window will be scrolled automatically for the error position to be shown.

Brace Matching Highlighting

The matching braces, '{' for '}' that starts and end the block of code are highlighted to avoid mismatching of the braces that can cause a syntax error.

Line Wrapping

The feature of line wrapping is added in the scintilla editor of Openscad, so that a new line can be continued in case of current line being full, to fit the complete line in the viewable window.

Line Numbers

Line numbers at the left margin of editor are provided that are really useful in large scripts and also to find the error line number.

Support Standard Commands

Standard shortcuts key commands such as Ctrl-Z for Undo, Ctrl+Shift+Z for Redo, Ctrl+X for Cut, Ctrl+C for copy, Ctrl+V for Paste, Ctrl+] for Zoom in and Ctrl+[ Zoom out are provided in the scintilla editor of Openscad.

Caret Line Visibility

The line where the cursor is placed currently is highlighted to locate the position of cursor easily.

Find, Replace, Replace All

To find and replace a piece of code in the script written, scintilla editor provides Find and Replace features in the Edit Menu. To replace all, All button should be pressed in the Find and Replace window. The shortcuts for Find features is Ctrl+F and Find and Replace is Ctrl+Alt+F.

Single line and Multiline comments

The single line comments started with // and multi line comments started with /* and ended with */ are highlighted usually in grey. Multi line comments can also be folded.

Clone this wiki locally