-
-
Notifications
You must be signed in to change notification settings - Fork 650
Code snippets
Code snippets allow user to define collection of code snippets that can be then used (inserted) in SQL Editor window.
To define snippets, open the Code Snippets editor either by using the main toolbar button, or from menu Tools -> Open Code Snippets editor, or with the configured hotkey (by default Alt+2 or Option+2 on macOS).
To use (insert) a snippet into current SQL Editor, invoke the code assistant (Ctrl+Space by default - or Cmd+Space on macOS) and then, while code assistant is still active, hit the same hotkey again (Ctrl+Space / Cmd+Space). This way you will switch code assistant to another mode - for inserting code snippets. From there you can choose the snippet to insert. If you defined a "code assistant shortcut" for a particular snippet (in snippets editor), then you can hit that shortcut, while code assistant is in "snippets mode". Otherwise you just have to pick the snippet from the list in the assistant.