Skip to content

Commit 296b6ab

Browse files
author
ternvein
committed
ADD: Filename tag
1 parent d8b2112 commit 296b6ab

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

command.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ function insertFileHeaderComment(picked_template){
6262
'time': date.toLocaleTimeString(),
6363
'time24h': date.getHours()+':'+date.getMinutes()+':'+date.getSeconds(),
6464
'year': date.getFullYear(),
65-
'company': 'Your Company'
65+
'company': 'Your Company',
66+
'filename': vscode.window.activeTextEditor.document.fileName.replace(/^.*[\\\/]/, '')
6667
};
6768

6869
replace = Object.assign(replace, {
@@ -178,4 +179,4 @@ function insertFileHeaderCommentOther(){
178179
insertFileHeaderComment(val);
179180
});
180181
}
181-
exports.insertFileHeaderCommentOther = insertFileHeaderCommentOther;
182+
exports.insertFileHeaderCommentOther = insertFileHeaderCommentOther;

0 commit comments

Comments
 (0)