How to Enable Code Snippets

Add .appclw and .APPCLW (no “*” in front of it) to the list in the Code Snippets setup. This tells the IDE to show snippets in the code completion list for the embed editor and the embeditor.

In my IDE I have this set of extensions for Clarion snippets:

How to Enable Code Snippets

Using Code Snippets

If you are in the “Embed Editor” then the Ctrl+J shortcut will bring up the snippets list. If you are in the Embeditor then Ctrl+J takes you to the “next filled embed” until you get to the last one and then Ctrl+J pops up the snippets.

The Clarion Binding in the IDE also includes an option to show the snippets, or not, in the normal Code Completion list:

Optionally show the snippets

Power User Hint

In my testing Ctrl+J for snippets works fine in the “Embed Editor” but when you are in the “Embeditor” (source view) Ctrl+J is assigned to “next filled embed”. However, snippets do appear in the standard code completion list ( Ctrl+Space ) and additionally, if you hit Ctrl+J enough times to get to the last “filled embed” then the snippets will popup after you get to the last one 😀

Of course you could use my KeyboardShortcuts addin to alter the assigned Ctrl+J keystroke on “next filled embed” which then allows Ctrl+J to popup the snippets list from the embeditor (the hardest part is finding an available shortcut to replace Ctrl+J) !

KeyboardShortcuts addin!

Additional Notes

One of the features in the EditorExtras addin is additional macros to popup a dialog so you can enter text that will be used in the snippet.

${PROMPT} – will popup a dialog and will be replaced with the entered value

${PROMPT_VALUE} – can be used within the same snippet multiple times and will be replaced with the value already entered.

Head on over to the product page for more details or dive straight into a short video demonstration!

Available Macros – Examples

Hint: Copy the example text below into a snippet and test it yourself!