1 Autocomplete Tuning
Rob Blanckaert edited this page 2016-01-05 13:14:42 -08:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 its 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.