1775206638
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 192 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 181 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 157 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
@@ -0,0 +1,9 @@
|
||||
module.exports = async function openTerminal(params) {
|
||||
const { app } = params;
|
||||
const vaultPath = app.vault.adapter.basePath;
|
||||
const command = `wt -d "${vaultPath}"`;
|
||||
const { exec } = require("node:child_process");
|
||||
exec(command, (error) => {
|
||||
if (error) console.error("执行失败:", error);
|
||||
});
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
<%*
|
||||
const vaultPath = tp.app.vault.adapter.basePath;
|
||||
const command = `wt -d "${vaultPath}"`;
|
||||
const { exec } = require("node:child_process");
|
||||
exec(command);
|
||||
return "";
|
||||
-%>
|
||||
@@ -1,11 +0,0 @@
|
||||
<%*
|
||||
const name = tp.date.now("YYYY-MM-DD_HH-mm-ss");
|
||||
await tp.file.rename(name);
|
||||
setTimeout(() => {
|
||||
const editor = app.workspace.activeEditor?.editor;
|
||||
if (editor) {
|
||||
editor.setCursor(0, 0);
|
||||
editor.focus();
|
||||
}
|
||||
}, 150);
|
||||
-%>
|
||||
@@ -1,6 +1,3 @@
|
||||
<%*
|
||||
await tp.file.rename("开发笔记");
|
||||
-%>
|
||||
# 需求 1
|
||||
|
||||
## 需求评审
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
<%*
|
||||
const monthDay = tp.date.now("MMDD");
|
||||
const name = await tp.system.prompt("笔记名称", "");
|
||||
if (name) {
|
||||
await tp.file.rename(monthDay + "-" + name);
|
||||
}
|
||||
-%>
|
||||
---
|
||||
日期: <% tp.date.now("YYYY-MM-DD HH:mm") %>
|
||||
来源:
|
||||
|
||||
Reference in New Issue
Block a user