-
Notifications
You must be signed in to change notification settings - Fork 9
Content Assist
Auto-completion and content assist is accessible at any time via the keybind: ctrl+space.
When typing "call" or "spawn" followed by a space and then pressing the keybind, it will list all available functions defined. Some times, it may take an underscore to activate it. If you press ctrl+Q on any of the items, it will provide documentation for that function. The documentation is the first and only the first comment in the function file.
You can also list all functions by typing _fnc anywhere.
The only way of accessing the list to the BIS functions is by typing BIS_ and ctrl+space. Documentation is available for those as well via ctrl+Q.
When the keybind is invoked after "localize", all Stringtable.xml entries will be listed. Some times, it may require str_ to be typed for it to automatically appear. Stringtable access also works for Header files when typing $STR_ and then pressing the keybind.
The stringtable.xml format is specified here.
It must be noted that all xml tags must be capitalized. For example: Project, Package, Container, and Key must all be capitalized like they were just typed. For the attribute "ID" inside the Key tag, it must be all caps as well.
A few shortcuts are:
ifthen
- for creating if() then{};
ifexit
- for creating if() exitWith{};
hintfo
- for creating hint format[""];
hintarg
- for creating hint format["%1", _this select ];
hintln
- for hinting the current file name and line number. Example: hint "file.sqf 5"
hintvalue
- for hinting an arbitrary value. Example: hint format["%1", ];
You can add your own auto-completion things by creating new live templates.