Macros
Macros, sometimes referred to as snippets, allow you to quickly insert text when you type certain words. You can think of Macros like an in-built text expander. Type a keyword and pre-defined text is returned.
How to use Macros
It is important to note that there is no UI for Macros, they are instead defined in config.edn under the :macros
key.
Open your
config.edn
file (search or via settings), and find themacros:
section.Type the macro name as the first word wrapped in curly braces e.g. the
foo
macro is typed as{{foo}}
Macros can have arguments configured with dollar variables. For example, the
hello
macro defined as"Hello $1 and $2!"
has two arguments and is invoked with comma-delimited arguments like{{hello foo, bar}}
. This results inHello foo and bar!
A few examples are included below:
Define a macro that inserts text at a specific locationCLOJURE1
Define a macro to insert today's date (via a [[Dynamic Variable]])CLOJURE1
Last updated