-
Notifications
You must be signed in to change notification settings - Fork 93
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
file templates not working #130
Comments
Hi @victorwpbastos, sorry for the delay, do you have "shell_input" set to true? |
Yes. |
Ah okay, that's why. Though I should have been a little smarter about doing it. If there are multiples paths specified (via curly brace expansion) I turn off the template functionality as the prompts would not work out very well. However, I should have kept it on if there is only one specified file, or if there is only 1 entry in the template. Thank you for the information. |
Even without |
Are there any errors in the ST log with shell_input set to false? |
Yes:
|
Ah I see, so there might be a problem with the snippet file (or how I'm processing it). Can you post that? |
<snippet>
<content><![CDATA[
var Marionette = require('marionette');
module.exports = Marionette.ItemView.extend({
template: require('templates/${TM_FILEPATH/.*views\/(.+)\..+/$1/}.tpl')
});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>view</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet> |
Works if I remove the regex part. |
Hi Victor, apologize for leaving this hanging. Anyways, I'll look into this a bit more soon. I know I use the "insert_snippet" command to work with the templates. My best guess is it's doing something odd with the regex. Thanks for the sample snippet. It should help in reproducing the issue! Thanks for using AdvancedNewFile. |
I have the following configuration:
but when I create new
js
files, the content is not being inserted as expected. Is this a bug only happeging on Windows? I'm using Windows 7 x86.The text was updated successfully, but these errors were encountered: