-
Notifications
You must be signed in to change notification settings - Fork 332
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
Snippets - custom variables (.sublime-options files?) #226
Comments
I feel like I've read this before ...? But yeah, this is definitely a (known) error. |
I had the idea I've mentioned it before, but I couldn't find it anywhere... if it is a dupe, I apologise! |
I cannot reproduce keith-hall's original post. Further documentation on how to implement custom variables for snippets would be really appreciated. |
I'm on the same boat. I could reproduce thee example, defining custom variables in a I can confirm that the documentation seems wrong. |
The documentation is objectively wrong on this part. I haven't gotten around to working on it, however. Pull requests are welcome. |
Ping on this. Any progress? I'm trying to get |
The snippets documentation refers to custom variables and states that they can be defined in
.sublime-options
files. https://github.com/guillermooo/sublime-undocs/blame/8a3b31288b1e329263c65701b5c133dc8755bc27/source/extensibility/snippets.rst#L105However, there is no other mention of
.sublime-options
files in the documentation, specifically, what file format they should be. Is this information actually true?In my experience, custom variables can be defined in
tmPreferences
files, in theshellVariables
dict section. As you know,shellVariables
are used to defineTM_COMMENT_START
andTM_COMMENT_END
, which can be used in snippets. Example: https://github.com/sublimehq/Packages/blob/4db940a44b74727ade298927d5ffdb8826fc9769/HTML/Comments.tmPreferences#L14-L16It therefore stands to reason that other variables can be defined here too. Example/proof:
Snippet:
Output when inserting snippet in a HTML file:
Therefore, please can the documentation be updated to reflect the facts.
The text was updated successfully, but these errors were encountered: