Skip to content

Multiple identical hotspots

erinata edited this page Apr 9, 2012 · 6 revisions

If the snippets contain multiple hotspots with the same default value. The will be triggered simultaneously. It means that you can edit them simultaneously.

For example,

Snippet:
for ($[![i]!] = 0; $[![i]!] < $[![max]!]; $[![i]!]++) {
    $[![]!]
}

When you trigger this snippet, all the hotspot $[![i]!] will be triggered. Therefore, if you type j, the text will become:

for (j = 0; j < $[![max]!]; j++) {
    $[![]!]
}

And all the i are changed to j .

Notice that empty hotspots $[![]!] are NOT considered as identical hotspots. Therefore, when you trigger the following snippet:

Snippet:
if (x > 0) {
    $[![]!]
} else {
    $[![]!]
}

The 2 $[![]!] will be triggered one by one instead of simultaneously.

Also, hotspots containing only numeric default values are NOT considered as identical hotspots. Therefore, in the following snippet:

Snippet:
ValueA = $[![0]!]
ValueB = $[![0]!]
ValueC = $[![0]!]

Those 3 $[![0]!] will be triggered separately.

Back to Main Page