Skip to content

rewritten with ts and added new variables #30

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/*
.vscode/*
.vscode/*
out/*
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The MIT License (MIT)
Copyright (c) 2016 Donna Iwan Setiawan
Copyright (c) 2016 Donna Iwan Setiawan, (c) 2025 Brian Williams

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ Define all custom variables/paramenters in asterisk `*` like
"*":{
"company": "Your Company"
"myvar1": "My Variable 1",
"myvar2": "My Variable 2"
"myvar2": "My Variable 2",
"myenv": "${env:MY_OS_VARIABLE}"
}
}
```
Expand All @@ -74,7 +75,7 @@ Use your variable in template like (asterisk `*` will be default template)
"${commentprefix} Created on ${date}",
"${commentprefix}",
"${commentprefix} Copyright (c) ${year} ${company}",
"${commentprefix} my variables are ${myvar1} and ${myvar2}",
"${commentprefix} my variables are ${myvar1}, ${myvar2} and ${myenv}",
"${commentend}"
]
}
Expand Down Expand Up @@ -115,7 +116,7 @@ You can define multiple templates, for instance template for MIT License
]
}
```
You can use your `mit` template above by calling it through `Command Pallete` and choose `FileHeaderComment: Select from Available Templates`.
You can use your `mit` template above by calling it through `Command Pallete` and choose `FileHeaderComment: Select from Available Templates`.

You can use parameters below in your template

Expand All @@ -132,12 +133,27 @@ You can use parameters below in your template
- `minute`: print current minute
- `second`: print current second
- `filename`: print filename
- `filepath`: print the absolute path of the file
- `parentpath`: print the parent path of the file
- `repository`: print the name of the git repository the file belongs to
- `repositoryurl`: print the URL to belonging to the git repository
- `author`: print the git user name
- `email`: print the git user email
- `package`: print the name of the package the file belongs to

You can also include environment variables using the prefix `env:`, for example `${env:HOME}`


## Release Notes
### 0.0.6
- Updated with typescript and using Yo Code (thanks to @bwilliams-sequence)
- Added right-click context menu support (thanks to @bwilliams-sequence)
- Added support for more default variables, useful for git workspaces (thanks to @bwilliams-sequence)
- Added support for OS environment variables (thanks to @bwilliams-sequence)

### 0.0.5
- fixing python comment style (thanks to @ronak1009)

### 0.0.4
- support yaml, shellscript language (thanks to @waddyvic)
- add day, month, hour, minute, second, filename parameter (thanks to @rcabg, @ternvein)
Expand Down
186 changes: 0 additions & 186 deletions command.js

This file was deleted.

31 changes: 0 additions & 31 deletions extension.js

This file was deleted.

10 changes: 0 additions & 10 deletions jsconfig.json

This file was deleted.

Loading