For community contributed syntax macros
Syntax Macros are little snippets of code stored in ServiceNow that can quickly be used in script fields using shortcuts. By typing the name of the syntax macro and then hitting TAB you can insert the code snippet directly into the field. No more trying to remember how to format GlideAggregate or mistyping the word query.
Syntax editor macros... a tiny thing that makes the developer life a lot easier
This funtionality is not avaliable out of the box but can (and should) be added! Service Portal: Syntax EditorMacros
For community contributed syntax macros
Script macros (aka syntaxt editor Macros) provide shortcuts for typing commonly used code. To insert macro text into a script field, enter the macro keyword followed by the Tab.