mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-05-05 13:02:27 +02:00
#29 - Include file opening
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user