by Jonke Korzelius
When you are writing Uniface ProcScript, every keystroke matters. Efficiency and accuracy are important and will boost your productivity. Auto-complete, also known as code completion, is a functionality integrated into modern code editors that predicts and suggests completions for the code you are typing based on the characters you have entered. It is like having an assistant that offers suggestions to streamline your coding process.
How Auto-Complete Works
When you start typing in a ProcScript editor with auto-complete enabled, it at once starts analyzing the character entered and presents a list of suggestions that match what you are typing. These suggestions can range from statements, functions, and pre-compiler directives, saving you from tediously typing out long names and thus preventing syntax errors. Entering a character, a-z, will suggest the list of statements that start with that letter, the $ plus character gives you the list of functions starting with that letter, and # plus character the pre-compiler directives accordingly. Continuing typing will look for the combination of characters in the list provided, backspace to close the list or hit Esc. Use the up and down arrow keys to navigate the list and Tab or Enter to accept a suggestion. Very much how this works in all popular editors.
You can disable the auto-complete feature in your usys.ini file if you do not need it or feel hindered by it, or if you have ideas on how we can improve this feature please contact us.
Go to the [widgets] section and change the codecompletion property to false:
SourceEdit=usrcedit(font=procboxfont;language=uniface;indenttabs=off;autoindent=on;indentsize=2;indentguides=off;codecompletion=false;codecompletionheight=10)
What this line also tells us is that you can specify the height of the code completion list; values between 10 and 30 are accepted, the default is 10.
In action:
Benefits of Auto-Complete
· Speeds Up Coding: By reducing the need to manually type out every character, auto complete accelerates coding tasks. With just a few keystrokes, you can select the desired suggestion from the list and move on to the next part of your code.
· Reduces Errors: Typos and syntax errors are common pitfalls in coding. Auto-complete helps mitigate these risks by suggesting correct syntax, minimizing the chances of introducing bugs into your codebase.
· Enhances Discoverability: Auto-complete serves as a powerful discovery tool. It exposes available statements, functions, and pre-compiler directives as you type, making it easier to explore and use the capabilities of the Uniface programming language.
Stay updated
Keep your Uniface installations up to date to receive help from the latest improvements and enhancements. We continually refine these tools to provide better suggestions and a smoother user experience.
#tofp