Skip to content
Open
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: 3 additions & 0 deletions command.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/

var vscode = require('vscode');
var os = require('os');

function insertFileHeaderComment(picked_template){
var workspace = vscode.workspace,
Expand Down Expand Up @@ -60,6 +61,7 @@ function insertFileHeaderComment(picked_template){
h = (date.getHours()+"").padStart(2, '0'),
m = (date.getMinutes()+"").padStart(2, '0'),
s = (date.getSeconds()+"").padStart(2, '0'),
username = os.userInfo().username,
replace = {
'date': date.toDateString(),
'time': date.toLocaleTimeString(),
Expand All @@ -68,6 +70,7 @@ function insertFileHeaderComment(picked_template){
'month': date.getMonth()+1,
'year': date.getFullYear(),
'company': 'Your Company',
'username': username,
'filename': vscode.window.activeTextEditor.document.fileName.replace(/^.*[\\\/]/, ''),
'hour': h,
'minute': m,
Expand Down