FileHeader icon indicating copy to clipboard operation
FileHeader copied to clipboard

Support ts file

Open halink0803 opened this issue 8 years ago • 5 comments

I am working with typescript and file header seems do not work with ts file? Can you guys add file header to support ts file or tell me how can I add it by myself?

halink0803 avatar Feb 10 '17 04:02 halink0803

Just add "ts": "js" to extension_equivalence in your settings. It may looks like:

"extension_equivalence": {
    "blade.php": "html",
    "ts": "js"
}

shiyanhui avatar Feb 10 '17 05:02 shiyanhui

I tried as you said but it does not work. Are you are it's extension_equivalence ?

halink0803 avatar Feb 10 '17 06:02 halink0803

Just add "ts": "js" to extension_equivalence in your settings. It may looks like:

"extension_equivalence": {
    "blade.php": "html",
    "ts": "js"
}

It works , thanks

justbefree avatar Jun 10 '20 02:06 justbefree

Just add "ts": "js" to extension_equivalence in your settings. It may looks like:

"extension_equivalence": {
    "blade.php": "html",
    "ts": "js"
}

But I have a question, Why isn't work if i created a TypeScrpt.tmpl file and put it in /template/header folder? Does that mean I can not create my own template ?

justbefree avatar Jun 10 '20 02:06 justbefree

But I have a question, Why isn't work if i created a TypeScrpt.tmpl file and put it in /template/header folder? Does that mean I can not create my own template ?

I did it for a few custom templates, following this:

  • create a custom folder and define it in "custom_template_header_path" in your settings - afaik using the sublime-text-3/Packages/FileHeader/ folder would erase everything in case of update
  • put your "TypeScript.tmpl" there
  • set this in your settings:
	"file_suffix_mapping": {
		"ts": "TypeScript",
	},
  • remove the "ts": "js" you added earlier

dawindd avatar Jul 11 '20 18:07 dawindd