Live Templates

Add your own completion items via code snippets

Live Templates are great for reducing the time you spend writing frequently used portions of code, like variable and loop declarations, or test functions.

You can edit, rename, turn off, or remove any of the predefined Live Templates, and even add your own.

How to use:

Open Settings/Preferences | Editor | Live Templates to see the full list of already supported templates.


Related Resources

Better time format in completion
Use the commonly known date/time formatting strings while writing time formatting in Go
Complete Current Statement
Add trailing commas or braces and move the cursor with a single keystroke
Code Completion in Language Injections
See how to use code completion inside strings and other places