diff --git a/CHANGELOG.md b/CHANGELOG.md index bd170853..47163d2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [1.12.0] - 2020-01-26 + +- [#29](https://github.com/estruyf/vscode-front-matter/issues/29): Open file after creating it from the template + ## [1.11.1] - 2020-12-10 - [#26](https://github.com/estruyf/vscode-front-matter/issues/26): Fix for arrow selection in the dropdown. diff --git a/src/commands/Template.ts b/src/commands/Template.ts index 79625df2..9945028b 100644 --- a/src/commands/Template.ts +++ b/src/commands/Template.ts @@ -92,6 +92,8 @@ export class Template { frontMatter = Article.updateDate(frontMatter); fs.writeFileSync(newFilePath, ArticleHelper.stringifyFrontMatter(frontMatter.content, frontMatter.data), { encoding: "utf8" }); + + await vscode.commands.executeCommand('vscode.open', vscode.Uri.file(newFilePath)); } const txtDoc = await vscode.workspace.openTextDocument(vscode.Uri.parse(newFilePath));