facebook

How I can setup a default header for my typescript files.

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #668584 Reply

    Tobias Schlegel
    Participant

    On Python I’m able to enter a template snippet to add the header.

    ”’
    Created on ${date}
    Copyright (C) ${year} Priamus System Technologies (info@priamus.com)

    @author
    : Tobias Schlegel
    ”’

    How I can do this in codemix editor?

    #668696 Reply

    Hi Tobias,

    You can create a file with the following path

    $WORKSPACE/.metadata/.plugins/com.genuitec.eclipse.code.core/.codeMixData/$NUMBER/User/snippets/python.json

    with the following content:

    
    {
    	"Add header": {
    		"prefix": "pyheader",
    		"body": [
    			"'''",
                "Created on $CURRENT_YEAR_SHORT-$CURRENT_MONTH-$CURRENT_DATE",
                "Copyright (C) $CURRENT_YEAR Priamus System Technologies (info@priamus.com)",
                "@author: Tobias Schlegel",
                "'''",
                "$0"
    		],
    		"description": "Adds header"
    	}
    }
    

    Please take a look at https://code.visualstudio.com/docs/editor/userdefinedsnippets#_variables for more info about available vars.

    Cheers,
    Sal

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: How I can setup a default header for my typescript files.

You must be logged in to post in the forum log in