Code Editor
Code editor component allows to edit code written in Java or ST programming language, such as Iotellect Server scripts or widget scripts.
The code editor supports:
- Java or ST syntax highlighting
- Find and replace
- Bracket matching
- Code folding
- Auto indent
- Auto-completing code
- Code inspection
- Import Suggestions
Keyboard Shortcuts
The below table lists default keyboard shortcuts available in Code Editor. To edit them, click on Configure Keyboard Shortcuts label in the Code Editor's status bar.
Name | Shortcut Key | Description |
Basic Editing | ||
Backspace | BACK_SPACE | Delete the previous char at the caret position. |
Delete to Word Start | Control BACK_SPACE | Delete previous chars until it sees a non-word char. |
Delete | DELETE | Delete the next char at the caret position. |
Delete to Word End | Control DELETE | Delete next chars until it sees a non-word char. |
Delete Current Line | Control Y | Delete current line. |
Insert Line Break | ENTER | Insert a line break at the caret position. |
Split Line | Control ENTER | Insert a line break at the caret position and keep current caret position. |
Start New Line | Shift ENTER | Start a new line next to the caret line and put caret at the beginning of the new line. |
Indent Selection | TAB | Indent the caret line if no selection and all selected lines if there is selection. |
Unindent Selection | Shift TAB | Unindent the caret line if no selection and all selected lines if there is selection. |
Join Lines | Control Shift J | Join the next line with caret line if no selection, or join all selected lines as one line if there is selection. |
Toggle Insert/Overwrite | INSERT | Toggle the overwrite/insert status. |
Toggle Rectangular Selection | Control BACK_SLASH Alt Shift INSERT | Toggle from regular selection to rectangular selection. |
Toggle Case | Control Shift U | Toggle the case of the selection. |
Code Completion | Control SPACE | Invoke code completion. |
Control E | Show Expression Builder. | |
Change Caret Position and Selection | ||
Select All | Control A | Select all the text in the editor. |
Move Caret to Line Start | HOME | Move caret to the start of the current line. |
Move Caret to Line End | END | Move caret to the end of the current line. |
Select to Line Start | Shift HOME | Select from the current caret position all the way to the line start. |
Select to Line End | Shift END | Select from the current caret position all the way to the line end. |
Move Caret to Document Start | Control HOME | Moves caret to the start of the code editor. |
Move Caret to Document End | Control END | Moves caret to the end of the code editor. |
Select to Document Start | Control Shift HOME | Select from the current caret position all the way to the document start. |
Select to Document End | Control Shift END | Select from the current caret position all the way to the document end. |
Page Up | PAGE_UP | Move caret one page up. |
Page Down | PAGE_DOWN | Move caret one page down. |
Select to Previous Page | Shift PAGE_UP | Select from the current caret position up by one page. |
Select to Next Page | Shift PAGE_DOWN | Select from the current caret position down by one page. |
Move Caret to Previous Char | LEFT | Move caret one char left. |
Move Caret to Next Char | RIGHT | Move caret one char right. |
Select Previous Char | Shift LEFT | Select the previous char of the current caret position. |
Select Next Char | Shift RIGHT | Select the current char of the current caret position. |
Move Caret to Previous Word | Control LEFT | Move caret to the previous word – the first space char before the current caret position. |
Move Caret to Next Word | Control RIGHT | Move caret to the next word – the first space char after the current caret position. |
Select Previous Word | Control Shift LEFT | Select the current caret position to the first space char before it. |
Select Next Word | Control Shift RIGHT | Select the current caret position to the first space char after it. |
Move Caret to Previous Line | UP | Move caret up by one line. |
Move Caret to Next Line | DOWN | Move caret down by one line. |
Select Previous Line | Shift UP | Select from the caret position up by one line. |
Select Next Line | Shift DOWN | Select from the caret position down by one line. |
Goto Line | Control G | Prompt a dialog to let user type in a line index and scroll to it. |
Select Word at Caret | Control W | Select the current word. |
Select to Matching Bracket | Control B | Select the current block that starts and ends with two matching brackets. |
Duplication Selection | Control D | Duplication the selection. If no selection, the caret line will be duplicated. |
Line Comments | Control SLASH | Using line style comment for comment a line or several lines. |
Block Comments | Control Shift SLASH | Using block style comment a line or several lines. |
Undo/Redo | ||
Undo | Control Z | Undo the last editing operation. |
Redo | Control Shift Z | Redo the last undone editing operation. |
Clipboard Operations | ||
Clipboard Cut | Control X Shift DELETE | Cut the currently selected text. If nothing is selected, cut the current line. |
Clipboard Copy | Control C Control INSERT | Copy the currently selected text. If nothing is select, copy the current line. |
Clipboard Paste | Control V Shift INSERT | Paste whatever on the clipboard to the current caret position. |
Clipboard Paste with Dialog | Control Shift V Control Shift INSERT | Prompt a dialog to allow user to select one of the previous clipboards and paste it. |
Find and Replace | ||
Find | Control F | Prompt a dialog to allow user to type in a text to search for. |
Find Next Occurrence | F3 | Find the next occurrence of the searching text. |
Find Previous Occurrence | Shift F3 | Find the previous occurrence of the searching text. |
Replace | Control R | Prompt a dialog to allow user to type in a text to replace with another text. |
Quick Search | Alt F3 | Using the Searchable feature to show a popup where user can type in a text without using a dialog. |
Folding Operations | ||
Fold Selection | Control PERIOD | Create a folding which contains the currently selected text. |
Expand Folding | Control EQUALS | Expand the current folding. |
Collapse Folding | Control MINUS | Collapse the current folding. |
Expand All | Control Shift EQUALS | Expand all the foldings. |
Collapse All | Control Shift MINUS | Collapse all the foldings. |
Was this page helpful?