|
|
|
|
|
- Overview
- Highlighting selected elements
- Selection in the code editor
- Selecting lines of code
- Rectangular selection
- Selection by level of blocks
- Handling one or more lines of code
- Selecting lines of code
- Moving lines of code
- Duplicating lines of code
- Delete parts of lines of code
- Go to the next line
- Information about the selected lines of code
- Scrolling through lines of code
- Reverse assignments
- Handling multiple lines of code (multi-cursor)
- Adding quotes/square brackets or brackets automatically
- Switching text to uppercase/lowercase
- Deleting empty lines
- Description window of the current element from the code editor
- Moving procedures or methods
- Creating a procedure with the keyboard
Code editor: Various operations
The code editor is the editor where the developers spend most of their time. This help page presents a series of options for the most common operations: Highlighting selected elements In the code editor, whenever the cursor is positioned on an identifier (variable, procedure, data file, etc.), all occurrences of this identifier are highlighted in the current code. Similarly, if the mouse cursor is positioned on a block statement (IF, THEN, ELSE, FOR, END, LOOP, WHEN EXCEPTION ON, etc.), the different elements of this block are highlighted. Finally, a series of dots around the current line help you quickly identify your position in the code.
All these options can be modified if necessary. To modify the highlighting options: - Open the code editor configuration window. To do so, go to the "Home" tab, "Environment" group, expand "Options" and select "Code editor options".
- On the "Code" tab, select the following options if necessary:
- "Highlight code blocks (IF/THEN/END, brackets, etc.)".
- "Highlight the current line".
- "Highlight the declaration and uses of the current variable".
- Confirm.
Note: All syntax highlighting colors can be configured in the "Styles" tab of the code editor configuration window. Selection in the code editor Selecting lines of code To perform a simple selection: - One click positions the cursor.
- Two clicks select the word.
- Three clicks select the line.
- Four clicks select the entire text.
Syntax highlighting is kept when text is selected. Note: To select the word at the cursor position, you can also press Ctrl + Shift + E. Rectangular selection You can select a horizontal or vertical rectangular text area in the code editor. This area can be copied/cut and pasted. To perform a rectangular selection: - Position the cursor at the beginning of the area to select.
- Press and hold the Alt key.
- Press the left mouse button and select the desired area.
Note: This selection can also be made with the keyboard:- Position the cursor at the beginning of the area to select.
- Use Alt + Shift + Arrow keys (up, down, right, left) to select the desired area.
The area can then be copied/cut via the context menu.
Note: When the area is pasted to another rectangular area, the copied text keeps its format.
Selection by level of blocks You have the ability to perform a selection by level of code blocks. To perform a selection by level of blocks: - Position the cursor in the block to select.
- Press Ctrl + Alt + Up arrow to select the block found above the cursor. Repeat this operation as many times as necessary.
- Press Ctrl + Alt + Down arrow to deselect the block found above the cursor. Repeat this operation as many times as necessary.
Handling one or more lines of code Selecting lines of code - One click positions the cursor.
- Two clicks select the word.
- Three clicks select the line.
- Four clicks select the entire text.
Moving lines of code A selected area (one or more lines of code) can be moved directly using the key combination Alt + Up Arrow or Alt + Down Arrow. Duplicating lines of code The duplication of lines of code (Ctrl + D) operates on a single line or on a selection of lines of code. Delete parts of lines of code To delete: - the code before the cursor (on the same line): Ctrl + Shift + Backspace
- the code after the cursor (on the same line): Ctrl + Shift + Del
Go to the next line When you are writing code and you reach the end of the line, you can use: - the Enter key,
- the Right arrow key.
Information about the selected lines of code When you select one or more lines of code, the status bar of the code editor displays the following information: SEL <Selected characters>|<Selected lines> For example, when you select 3 lines of code, you might see the following: Scrolling through lines of code In the code editor, you can scroll through lines of code: - vertically, using the mouse wheel,
- horizontally, using Shift + mouse wheel.
New in SaaSFor faster scrolling, use the following shortcuts: - Alt + mouse wheel for vertical scrolling (10 lines at a time).
- Alt + Shift + mouse wheel for horizontal scrolling.
Reverse assignments To reverse an assignment: - Select the line of code that contains the assignment.
- Press Ctrl + Alt + = to reverse the assignments.
For example, the following code: nx is int
ny is int
nx = ny
becomes: nx is int
ny is int
ny = nx
New in version 2025Handling multiple lines of code (multi-cursor) By setting multiple cursors, you can edit multiple lines of code at the same time in the code editor. You can: - Insert the same text in multiple places simultaneously.
- Rename multiple instances in a single action.
To set multiple cursors, simply press Ctrl + Alt and click where you want to set a new cursor.
Any changes made will be applied at all cursor positions. To remove one of the cursors, simply press Ctrl + Alt again and click the cursor you want to remove. To remove all cursors, click anywhere in the code editor. Adding quotes/square brackets or brackets automatically To automatically add quotes, square brackets or brackets: - Select one or more words in the code editor.
- Press the quote, square bracket or bracket key.
- The selected text is automatically enclosed between 2 quotes, 2 square brackets or 2 brackets.
Switching text to uppercase/lowercase To automatically switch text to uppercase or lowercase in the code editor: - Select one or more words in the code editor.
- Use the following shortcuts:
- Ctrl + M: Switch the selected text to lowercase.
- Ctrl + Shift + M: Switch the selected text to uppercase.
New in SaaSAs you write or paste code in the code editor, you may end up with several line breaks or empty lines. To remove these empty lines and clean up your code: - Position the cursor in a given section of code.
- Open the context menu and select "Refactoring .. Remove empty lines".
- Indicate the scope of the action: current code, current element, all code displayed.
- Confirm. Empty lines are removed.
Note: If this option is used on a selection of lines of code, any empty lines in this selection will be automatically removed. Description window of the current element from the code editor To display the description window of the element corresponding to the displayed code: - Position the cursor in the desired code.
- Press Alt + Enter.
Moving procedures or methods The procedures or the methods are displayed in their creation order by default.
To move a procedure or a method: - Position the cursor at the beginning of code to move.
- Select the procedure or method using the mouse, or press Ctrl + A.
- Cut the procedure or method (Ctrl + X).
- Move the mouse cursor to the new position.
- Paste the procedure or method (Ctrl + V).
The procedure or method was moved. Creating a procedure with the keyboard To create a global procedure, you can: - use the project explorer.
- use the "Code" pane of code the editor ("New" button).
- type the prototype of the procedure to create at the end of an existing procedure.
To create a local procedure, you can: - use the "Project explorer" pane.
- use the "Code" pane of code the editor ("New" button).
- type the prototype of the procedure to create in the "Global declarations" event of the window or page.
For more details, see:
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|