*: cleanup

Making a few changes for publishing the first command
This commit is contained in:
Vincent Batts 2017-02-20 10:39:04 -05:00
parent 54635910dc
commit 11161b33c5
2 changed files with 11 additions and 17 deletions

View file

@ -5,21 +5,11 @@ var vscode = require('vscode');
// this method is called when your extension is activated
// your extension is activated the very first time the command is executed
function activate(context) {
console.log('next-note: activated');
// Use the console to output diagnostic information (console.log) and errors (console.error)
// This line of code will only be executed once when your extension is activated
console.log('Congratulations, your extension "next-note" is now active!');
// The command has been defined in the package.json file
// Now provide the implementation of the command with registerCommand
// The commandId parameter must match the command field in package.json
var disposable = vscode.commands.registerCommand('extension.sayHello', function () {
// The code you place here will be executed every time your command is executed
// Display a message box to the user
context.subscriptions.push(vscode.commands.registerCommand('extension.sayHello', function () {
vscode.window.showInformationMessage('Hello World!');
});
context.subscriptions.push(disposable);
}));
context.subscriptions.push(vscode.commands.registerTextEditorCommand('extension.nextNoteInsertDate', function () {
var editor = vscode.window.activeTextEditor;
@ -32,16 +22,16 @@ function activate(context) {
if (editor.document.lineCount > cursorEnd.line+1) {
cursorEnd.line += 1;
}
var d = new Date();
editor.edit(editBuilder => {
editBuilder.insert(cursorEnd, "farts\n");
editBuilder.insert(cursorEnd, "## "+ d.toString() +"\n");
});
console.log(cursorEnd);
}));
}
exports.activate = activate;
// this method is called when your extension is deactivated
function deactivate() {
console.log("next-note deactivated")
console.log("next-note: deactivated")
}
exports.deactivate = deactivate;

View file

@ -4,6 +4,10 @@
"description": "Helpers for daily notes",
"version": "0.0.1",
"publisher": "vbatts",
"repository": {
"type": "git",
"url": "https://git.thisco.de/vbatts/vscode-next-note"
},
"engines": {
"vscode": "^1.5.0"
},
@ -24,7 +28,7 @@
},
{
"command": "extension.nextNoteInsertDate",
"title": "NextDate"
"title": "NextNote: Date"
}
]
},