The Editor

Using the editor should work much similar to other popular editors. Many features from popular editors such as Notepad++, Visual Studio Code, and Sublime can be found in the new Quantlab Editor. The main reason for using the Quantlab built-in editor is its direct link to the (multi-threaded) debugger.

We have already addressed the possibility to work with personalized appearance, by setting fonts and coloring. Below are some of the key features described one-by-one.

Go-to-definition

By right-clicking (ctrl + 0) on an Enumerator, Function, Class, Class member, go-to-definition will appear in the menu. If the function is openly readable and only exist in one instance, it will jump straight to that place in the expression window or library. If there are multiple instances of the function, a selectable list will open. If the function is built-in or used from a compiled qll, the list will high-light <built-in> and the relevant qll will be highlighted.

../../_images/image61.png

Call-tip and member completion

When writing a function and setting the first function bracket, a call-tip with all alternative variants of the function will appear. By clicking on the right / left arrow (alt + right/left arrow key) will cycle through all the variants. The current variable will highlight. If the call-tip is lost, pressing ctrl + space will get it back when inside the brackets.

When working with an object, class or enumerator, its available and public members will appear in a drop-down in alphabetical order.

../../_images/image71.png

Multi-caret/cursor editing

By double clicking on a variable word or other character in the editor, all instances will highlight. To enable multiple simultaneous editing, repeated use of Ctrl + D will add next appearance and leave a caret/cursor point at all those places. Then the all can be edited at the same time.

Using Ctrl + selection (using mouse left click) in code, will leave a caret/cursor at all places where clicked. Then multi-instance editing can be done.

Using Alt + selection (using mouse left click) will highlight a “box” of lines and open up for multi-caret/cursor editing at the point where the mouse cursor ends.

Revert all Changes / Revert to Compiled State

When coding in an old library or workspace, revert all changes will undo all changes in the current file/expression done in the current session. To un revert, either revert to latest compiled state, or “redo” using ctrl + shift + z.

Revert to compiled state will do just that - revert to latest compiled state in the current file and session.

Other Editor Settings

A number of visual features and settings can be found in the Setting menu. The most important are;

Setting

Description

Appearance

Open the menu for all font and coloring options

Show line numbers

Turn line numbers on/off

Show whitespace

Display tab / space in the editor

Show line endings

Display all line-endings

Highlight currentline

Change display of current line highlighting, none, box, filled etc

Caret width

Number of pixel points to display the caret/cursor line with

Show diagnosticsinline

Turn on to show message in-line with the code in the editor

Show diagnostics inthe margin

Turn on to show a graphic element with mouse over diagnostics in the left column

Auto indent

Turn auto indentation on/off

Indent and tab size

Set indent and tab size

Indent with spaces

Turn on to set indents using space instead of tab

Show indentationguides

Show vertical lines to indicate where indentation is set on each row

Enable Code Folding

Show / hide the vertical folding markers on the left-hand side of the code. Can fold code per bracket tuple.

Auto-save libraryrecovery backup

Turn on/off auto-save library file. A backup will be created in the same folder and with the same name as the original with a ~bu~ file type extension. Any time the library file is in uncompiled state the back-up will be created.