Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non-linked template values #1

Merged
merged 1 commit into from
Jun 2, 2015
Merged

Support non-linked template values #1

merged 1 commit into from
Jun 2, 2015

Conversation

ainslec
Copy link
Owner

@ainslec ainslec commented Jun 2, 2015

Currently, "autocomplete" allows templates to be used for autocompletes. The problem is that only one cursor tabstop can be used ( to signify the cursor resting place after completion), and any values specified as varnames are linked in the editor such that specifying a value for one "varname" will alter the values for all other varnames that share the same varname. Sometimes we want to be able to alter values independently but we want the same initial value.

This update adds the following syntaxes

Example 1:

${:replacement}${:replacement}${:replacement}

In the above example, there will be three tabstops showing "replacment" (without the colon). If the colon was not specified then typing in the highlighted area would alter all three "replacement" fields, with the colon, now there are three replacements to modify across the three tabstops. Typing in one will not affect the others.

Alteration 2:

Allow the '}' character in varnames.

Example:

${:}}

This will create a tabstop showing an initial value of "}" (without quotes). The value of this change is that sometimes the tabestop may require values that include braced brackets but currently, rbrace is not supported as a template value. With the escaped rbrace, it allows a full range of template values.

Currently, "autocomplete" allows templates to be used for autocompletes. The problem is that only one cursor tabstop can be used ( to signify the cursor resting place after completion), and any values specified as varnames are linked in the editor such that specifying a value for one "varname" will alter the values for all other varnames that share the same varname. Sometimes we want to be able to alter values independently but we want the same initial value.

This update adds the following syntaxes

Example 1:

${:replacement}${:replacement}${:replacement}

In the above example, there will be three tabstops showing "replacment" (without the colon). If the colon was not specified then typing in the highlighted area would alter all three "replacement" fields, with the colon, now there are three replacements to modify across the three tabstops. Typing in one will not affect the others.

Alteration 2:

Allow the '}' character in varnames.

Example:

${:\}}

This will create a tabstop showing an initial value of "}" (without quotes). The value of this change is that sometimes the tabestop may require values that include braced brackets but currently, rbrace is not supported as a template value. With the escaped rbrace, it allows a full range of template values.
ainslec added a commit that referenced this pull request Jun 2, 2015
Support non-linked template values
@ainslec ainslec merged commit 6390e7f into master Jun 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant