foam-template/docs/features/日常笔记.md
2021-12-08 22:31:39 +08:00

42 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 日常笔记
每日笔记可让你快速创建和访问今天的笔记。
试试看,运行`Foam: Open Daily Note`命令。
## 快捷方式和模版
你可以通过按`alt+d`快速打开今天的每日笔记。
你还可以通过`Foam Open Daily Note: On Startup`设置自动打开今天的笔记。
你还可以使用[snippets](https://code.visualstudio.com/docs/editor/userdefinedsnippets)以配置的方式快速创建指向日常笔记的超链接。
输入`/today`并按`enter`链接到今天的笔记。
你也可以写:
| Snippet | Date |
| ------------ | ------------- |
| `/tomorrow` | tomorrow |
| `/yesterday` | yesterday |
| `/monday` | next Monday |
| `/+1d` | tomorrow |
| `/-3d` | 3 days ago |
| `/+1w` | in a week |
| `/-1m` | one month ago |
| `/+1y` | in one year |
你懂的 ;)
## 配置
通过遵循[日期格式特征语法](https://github.com/felixge/node-dateformat#mask-options),可以自定义日常笔记的路径和标题。
可以使用以下属性:
```json
"foam.openDailyNote.directory": "journal",
"foam.openDailyNote.filenameFormat": "'daily-note'-yyyy-mm-dd",
"foam.openDailyNote.fileExtension": "mdx",
"foam.openDailyNote.titleFormat": "'Journal Entry, ' dddd, mmmm d",
```
上述配置将创建一个文件`journal/daily-note-2020-07-25.mdx`,标题为`Journal Entry, Sunday, July 25`