-
Notifications
You must be signed in to change notification settings - Fork 1
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 for Variable Substitution #2
Comments
Hey @Alecton4! Thanks for submitting this issue. I agree this would be a nice feature but I'm not sure it's currently possible. There's an open feature request for it upstream though: microsoft/vscode#2809 |
Found an unmaintained package that addresses this problem: vscode-variables (but doesn't work b/c the version of VSCode it depends on is too old) So, I should say, this is possible to some extent. We could manually support a subset of these variables, for example. I'd agree that the one you've identified is probably one of the more useful ones. Another option is to add a setting along the lines of |
I gave this some more thought and feels like the best answer here (for your example, at least) is to make the directory relative to the current file by default. I've done that in the linked PR; feel free to add feedback there. In the more general case of supporting variable substitution, we can add more broad replacements (similar to how it's done in the cmake tools extension); it's not entirely straightforward but not incredibly difficult. |
@hall Thank you so much for your effort! Just for your information, this Markdown Paste extension seems to support predefined variables, many of which are the same as VSCode's ones. But they may not necessarily be retrieved from VSCode. I tested it and it works fine. Since I'm not a JS/TS developer, I may not be able to help you much. But I hope Markdown Paste could provide you with some insights! |
Is it possible to support variable substitution for the
draw.directory
setting like VSCode? Currently it does not support this feature. When I have"draw.directory": "${fileDirname}/attachments"
, this is the result:The text was updated successfully, but these errors were encountered: