Sublime Forum

How to create new files with headers?

#1

I’d like to be able to create new PHP, CSS, HTML, etc files with a header appropriate to the file type, which contains automatically generated creation time (CTIME, in the header format that I use) and author name (possibly via a windows environment variable - “Donald Duck” in the example below!). Currently I generate headers via a separate script then cut-and-paste.

E.g. in PHP:

/**
 * CTIME  : 2024-01-22 10:49:29
 * AUTHOR : Donald Duck
 *
 * MODIFICATION RECORD
 */

Etc. How can I do this?

0 Likes

#2

It’s a very specific requirement, I think there’s no plugin to do exactly what you need. The best thing you can do is write your own plugin.

0 Likes