Skip to content
Vadim Dyachenko edited this page Apr 20, 2019 · 3 revisions

This page details less-obvious items in Preferences.

Auto-completion mode

This defines how auto-completion filtering works.

  • Start of string

    This is how things worked in legacy versions of GameMaker - if you typed ds_, you only get names that start with ds_.

  • Containing

    This is how auto-completion works in GameMaker Studio 2 - if you type debug_, you'll get debug_get_callstack, show_debug_message, and so on.

  • Smart

    This is an auto-completion mode offered by GMEdit's code editor component (Ace.js).
    It matches names that contain all letters from the input, and in order.
    So, sdm will match show_debug_message and icl matches io_clear.

  • Per-section

    This is an auto-completion mode written specifically for GML's naming specifics.
    It matches names that have each "section" (separated by _ or lowercase->UPPERCASE transitions) start with according letter of input.

    So, sdm will still match show_debug_message, but icl will get you instance_create_layer.
    You can also use SDM or ICL if you prefer (it'll still be completed to the normal name).

    If this produces too many results, or you do not, in fact, remember the name of a thing, you can "clarify" section(s) by adding opposite-cased letters after the first one.
    So, if you wanted to only get device_mouse_ functions but not ds_map_ ones, you could write dmO/DMo (d*_mo*) or dEm/DeM (de*_m*).

    For convenience, this completion mode can also access full matches in global variables (gsv -> global.someVar).

Better workflow:

Syntax extensions:

  • `vals: $v1 $v2` (template strings)
  • #args (pre-2.3 named arguments)
  • ??= (for pre-GM2022 optional arguments)
  • ?? ?. ?[ (pre-GM2022 null-conditional operators)
  • #lambda (pre-2.3 function literals)
  • => (2.3+ function shorthands)
  • #import (namespaces and aliases)
  • v:Type (local variable types)
  • #mfunc (macros with arguments)
  • #gmcr (coroutines)

Customization:

User-created:

Other:

Clone this wiki locally