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

feature request: add a TM_FILENAME_BASE and TM_FILENAME_EXT or similar variables for snippets #25173

Closed
dmccaffery opened this issue Apr 22, 2017 · 1 comment
Assignees
Labels
feature-request Request for new features or functionality snippets

Comments

@dmccaffery
Copy link

  • VSCode Version:
$ code --version
1.11.2
6eaebe3b9c70406d67c97779468c324a7a95db0e
  • OS Version:
$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.12.4
BuildVersion:	16E195

Feature Request:

Currently, the TM_FILENAME includes the extension and their is no way to strip this within a snippet. For snippets such as those that insert a class definition in languages where the file name is conventionally relevant to the class / module / function within, it would be great to get access to the filename with the extension stripped.

I can't think of a scenario with the filename extension is relevant, honestly, but if you're going to split the string on the first occurrence of a ., you might as well join everything to the right of that dot and have a var for that as well. :)

@mjbvz mjbvz added api feature-request Request for new features or functionality snippets labels Apr 22, 2017
@jrieken jrieken removed the api label Apr 24, 2017
@jrieken
Copy link
Member

jrieken commented Apr 27, 2017

Transformations is what we need. Closing as dupe of #6920

@jrieken jrieken closed this as completed Apr 27, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality snippets
Projects
None yet
Development

No branches or pull requests

3 participants