-
Notifications
You must be signed in to change notification settings - Fork 29
Final caret position
Hotspots are triggered from left to right and from top to bottom. Sometimes you may want to control where the final caret locates. Simply put $[0[]0] inside your snippet to indicate this "Final Caret position":
For example,
Snippet Content:
<article>
<header>
$[![Some Header Text]!]
</header>
<p>$[0[]0]</p>
<footer>
$[![Some Footer Text]!]
</footer>
</article>
In this snippet, there are 2 hotspots. When you trigger the snippet, the first hotspot $[![Some Header Text]!] will be triggered first. The text become
<article>
<header>
Some Header Text
</header>
<p>$[0[]0]</p>
<footer>
$[![Some Footer Text]!]
</footer>
</article>Suppose you hit [tab] to accept the default value for $[![Some Header Text]!], the second hotspot $[![Some Footer Text]!] will be triggered.
<article>
<header>
Some Header Text
</header>
<p>$[0[]0]</p>
<footer>
Some Footer Text
</footer>
</article>Hit [tab] again, as there is no hotspot in the snippet anymore, The caret will go to the Final Caret Position $[0[]0] at the <p> tag.
There is no need to specify $[0[]0] if you do not want to. However, it is important that there should NOT be more than one "Final Caret Position" $[0[]0] in any snippet.