ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Editors / Code editor
  • Overview
  • How to?
  • Indenting an existing code
  • Configuring the automatic reindentation of a pasted code
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview
When typing compound statements ("Switch", "For" and "While", for example), the code is automatically indented to highlight the structure of the loops used in the program.
As soon as the first statement is typed, the "END" keyword is automatically inserted and the cursor is positioned in the compound statement.
New in version 2025
Thin lines show the indentation in the code editor. The line becomes thicker to indicate the area in which the cursor is positioned.
Automatic indentation also allows aligning by the '=' sign and the word 'is'.
How to?

Indenting an existing code

Several options can be used to indent an existing code or the code currently typed:
  • To indent the current line of code to the left go to the "Code" tab, "Edit" group and click "Unindent".
  • To indent the current line of code to the right go to the "Code" tab, "Edit" group and click "Indent".
  • To automatically indent the entire code, on the "Code" tab, in the "Edit" group, click "Auto re-indent." (or press Ctrl + R).
To configure the automatic reindentation options:
  • Position the cursor in the code editor (but not on a line that contains WLanguage code).
  • On the "Code" tab, in the "Edit" group, expand "Auto re-indent." (or press Ctrl + R).
  • A window allows you to configure the scope of automatic indent. The scope may correspond to:
    • current code: only the process currently being edited (where the mouse cursor is positioned) is re-indented.
    • current element all events associated with the element currently being edited in the code editor are re-indented (e.g. all window, field and menu codes associated with the window).
    • the entire code displayed in the active code window all events or processes currently displayed in the code window will be re-indented.
    • all the WLanguage code of the project all events for all project elements.
  • The "Align by '=', 'is', '//'" option allows aligning all the text and code to the right of '=', 'is' or '//'.
    This option will be automatically taken into account for all subsequent automatic reindentations with Ctrl + R.

Configuring the automatic reindentation of a pasted code

To automatically reindent the code during a copy/paste:
  1. Display code editor options: under the "Home" pane, in the "Environment" group, pull down "Options" and select "Code editor options".
  2. On the "Code" tab, check "Indent (pasted code is edited and indented to fit layout)".
    Indentation option
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/31/2024

Send a report | Local help