SublimeText / AdvancedNewFile

File creation plugin for Sublime Text
MIT License
829 stars 93 forks source link

Feature: Create file identification generator #163

Closed jeanniton-mnr closed 7 years ago

jeanniton-mnr commented 7 years ago

Well..., I am not sure if this is the right place to request a feature.

I would like a file identifier generator to be implemented in this plugin. I mean when you create a new file with ANF, the file will have a header enclosed inside a comment (based on the programming language type) that can look like that for instance:

/**
 * ==============
 *   FileName.js
 * ==============
 *
 * @author: Author Name
 * @github: https://github.com/author
 * @contact: author@email.com
 * @created: February, 17 2017
 *
 */

, and which can be configured in Package Setting in Sublime Text.

skuroda commented 7 years ago

Hi @devmnrj, this is actually already supported! Take a look at the file_templates setting. I'm going off memory so I could be misremembering but creating something like

{
    "file_templates": {
        "js": ["Packages/User/js-template.sublime-snippet"]
    }
}

The contents of that file should then match the formatting of sublime text snippets (http://docs.sublimetext.info/en/latest/extensibility/snippets.html#snippets). When you create the file, it should insert the text from the snippet.

jeanniton-mnr commented 7 years ago

Oops..! Ok I didn't about it yet. thanks

skuroda commented 7 years ago

Hi @devmnrj, I'm going to close this ticket. Please feel free to comment on it if something isn't working as expected.