#29 - Include file opening

This commit is contained in:
Elio Struyf
2021-01-26 09:35:02 +01:00
parent 7b9ff391b4
commit 73491ae55f
2 changed files with 6 additions and 0 deletions

View File

@@ -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.

View File

@@ -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));