The SnippetLoop command enables you to reference a snippet of the Snippet Glossary that you want to expand repeatedly inside an expansion.
When selecting the Snippet Loop... menu item, the following dialog will help you choose the wanted snippet:
At expansion time the referenced snippet is expanded once and then proposed repeatedly as a pick choice in the expansion table.
Practically, you will start an upper case next word loop by expanding the following expansion glossary entry:
Short | unwl |
---|---|
Expansion | {SnippetLoop}uppercase-next-word{/SnippetLoop} |
Display as | Upper Case [next word] loop |
Upon expanding unwl
At that point, if you want to uppercase the next word again, you will do so by hitting your marker key (or space bar for those who expand with the space bar) in a loop, until you are done.
The expansion table will propose uppercasing the next word again and again.
So you may wonder how do I stop this loop? Simply by ignoring the displayed pick choice when you are done. Just continue typing whatever you want to. The fact that the expansion table displays a pick choice does not mean that you mandatorily need to pick something.
Note that if you have placed subsequent text or commands after your SnippetLoop command you will need to press your Resume Hotkey to resume the expansion after the loop.
If we have defined the following snippet that uppercases the next word in our Snippet Glossary:
Snippet name | uppercase-next-word |
---|---|
Expansion | {Snippet}select-next-word{/Snippet}{UpperCase} |
Display as | Upper Case [next word] |
The following expansion using the SnippetLoop command:
allows to uppercase the words at the right of the current cursor position repeatedly.
An alternate way to uppercase the next words is to use a SnippetLoop command that repeats the selection of the next word followed by an UpperCase command that uppercases the whole selection:
In this case, once you are done selecting the next words you want to uppercase, you press your Resume Hotkey to resume the expansion with the UpperCase command.