-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Allow snippets to start with other characters than alphabetical #35651
Comments
Please share your snippet, the language in which you are trying this, the exact line contents, and how you are inserting a snippet (via IntelliSense, via the Insert Snippet command, or via tab completion). This is important because there are no restrictions about snippets prefixes in general. |
The language is Javascript, for example I have following snippet:
That generates a bold comment separator for a code, like this:
It doesn't work however, I tried several prefixes like "*=", "=*", working only those that start with alphabetical letters like "c*", "C=" and so on. I insert snippet by typing prefix and pressing tab. I also wanted to add "/*" snippet to generate comments sections like this:
This is something supported by default if other IDEs (there is one asterisk in the beginning). Other case is Laravel style comments block with prefix: "/*|"
|
Thanks for clarifying. So, "yes" the snippets works but "no" the IntelliSense windows doesn't show when typing Closing this as a duplicate of #32201 |
So tab key works only when IntelliSense can read the prefix? Maybe there is a way to add a hook for tab key, for example with HTML VS Code has Emmet functionality included, it works on tab key and I think is not connected to IntelliSense. |
You must enable tab-completion for this by adding |
@jrieken That worked! Thanks! |
Currently when I write a snippet it only works when it starts with [a-zA-Z] characters, in my other IDE I have tons of snippets that start like /*=, *=, */, and so on, this is not possible with VS Code unfortunately. Allowing this will really improve my experience as I'm really used to my sets of snippets.
The text was updated successfully, but these errors were encountered: