Skip to content

Autocomplete Tuning

Rob Blanckaert edited this page Jan 5, 2016 · 1 revision

Autocomplete Priority

When a user is typing, sometimes it is useful to arrange the autocomplete results so the ones they are most likely to use are displayed first. For example, here we would like findNearestEnemey to display before findNearestItem, as it is the more common use case.

To change it’s position, we can add an Autocomplete Priority in the Components editor. Find the component that provides the function you wish to change and tab to its settings. Using the add attributes button you can add the property.

The default autocomplete priority is 1. This value acts as a multiplier, normally a value of 1.2 is enough to boost a method enough relative to closely matching peers.

Automatic Variable Capture

Automatic variable capture can be enabled for functions. When this function is autocompleted as the first expression on a line, an assignment to the named variable is inserted in front of it.

This feature is best enabled for functions with no side effects, where calling it without using its value makes no sense.

Clone this wiki locally
You can’t perform that action at this time.