Foam
T

Daily notes

Automatically create a Daily Note by executing the "Foam: Open Daily Note" command. If a Daily Note for today's date already exists, the command opens the existing note.

Daily note feature in action

Keyboard shortcut

The default keyboard shortcut for "Open Daily Note" is alt+d. This can be overridden using the VS Code Keybindings editor.

Configuration

By default, Daily Notes will be created in a file called yyyy-mm-dd.md in the workspace root, with a heading yyyy-mm-dd.

These settings can be overridden in your workspace or global .vscode/settings.json file, using the dateformat date masking syntax:

  "foam.openDailyNote.directory": "journal", // a relative directory path will get appended to the workspace root. An absolute directory path will be used unmodified.
  "foam.openDailyNote.filenameFormat": "'daily-note'-yyyy-mm-dd",
  "foam.openDailyNote.fileExtension": "mdx",
  "foam.openDailyNote.titleFormat": "'Journal Entry, ' dddd, mmmm d",

The above configuration would create a file journal/note-2020-07-25.mdx, with the heading Journal Entry, Sunday, July 25.

Daily Note Templates

In the future, Foam may provide a functionality for specifying a template for new Daily Notes and other types of documents.

In the meantime, you can use VS Code Snippets for defining your own Daily Note template.

Roam-style Automatic Daily Notes

Foam provides an option for automatically opening your Daily Note when you open your Foam workspace. You can enable it by specifying the following configuration in your .vscode/settings.json:

{
  // ...Other configurations
  "foam.openDailyNote.onStartup": true
}

Extend Functionality (Weekly, Monthly, Quarterly Notes)

Please see [[note-macros]]

Show Graph Visualisation