Tips #3.2 Development: The Code Editor - Delimiters and Suggestions

Mis à jour : 8 août 2019

Today, I'm going to talk about 2 options I discovered in V17.

  • Validation of suggestion

  • Insert () and closing } ) ] "

These options can be found in 4D's preferences in the options of the methods tab.

Validation of suggestion

I got mad in one of my bases where every time I wanted to do a "save()", I found myself with a "saveCallback()" instead. Then I had to delete the "Callback" to get my "save()". Not very convenient and very frustrating. I finally found, in the preferences, an option called "Validation of suggestion". By default the validation is by "Tabulation and delimiters". That's why when I typed "save(" it validated the first suggestion that was "saveCallback". So I decided to change to use the "Tabulation only" option to validate a suggestion only with the tab (or with the Carriage return key).

Validation of suggestion : Tab and Delimiters
Validation of suggestion : Tab only

Insert () and closing } ) ] "

This second option will allow you to increase the longevity of your keyboard. In fact, this option will automatically close a parenthesis, quotation mark, or one of the other characters in the list, automatically when necessary. I say when it is necessary because 4D will know in some cases that it should not necessarily close.

This option also allows you to automatically surround the selection with the entered character.

Insert () and closing } ) ] " Enable
Insert () and closing } ) ] " Disable
Automatic surrounding around the selection

These 2 options, well configured, can improve your comfort. Test which options suit you best and are most enjoyable for you.

54 vues0 commentaire

Posts récents

Voir tout

List of 4D Components and Plugins

I realize that there is no list of existing components and plugins in 4D. I think it can be cool to make such kind of list to try to have a kind of catalog where people can look at to see what is avai