The 4D Code Editor just got more user friendly! Say hello to character completion for quote marks “ ”, parentheses ( ), brackets [ ], and curly braces { }, as well as command blocks (For…End for, If … End if, etc.). But that’s not all, bracket matching has also been added to help you manage your collections, and the syntax for user methods is now displayed in the status bar just like a 4D command syntax!
The Code Editor is getting more intuitive to ease your daily work and save your fingers!
character completion
If you select the new option: Preferences Method Options Insert ( ) and closing } ) ], the closing characters are automatically inserted when you type the opening character [, {, “, or (. But of course, the Code Editor is smart enough to avoid adding closing characters in all cases. For example, if you are typing a comment or a string, it doesn’t write the closing character. The same goes when you type the closing character yourself, the automatically-inserted character is overwritten. With this option, 4D inserts the parentheses for you when you select a 4D command, keyword, or project method from a suggestion or a completion list, if necessary.
Closing of command block
Normally, if you open a command block without using a macro, you need to close the block manually. But it can be a pain in the neck when you have several nested blocks. Now, when you’re in one closed block, 4D automatically suggests the corresponding closing block when your cursor is in an empty row. Just type the Tab key and the closing block is inserted!
Other new tips
Managing the syntax in the status bar has been expanded to include user methods and improved by highlighting the parameter you’re modifying.
As for parentheses or braces, 4D highlights these sets in the code editor, so you can easily verify if one is missing in your code.