A personal dictionary that can be easily looked-up from within your notes.
Set definition folder
. This registers the folder as your definition folder.Add definition
command. This will display a pop-up modal, where you can input your definition.Preview definition
command when your cursor is on the word/phrase.Options available:
You may want to assign hotkeys to the commands available for easy access:
Note Definitions does not maintain any hidden metadata files for your definitions. All definitions are placed in your vault and form part of your notes. You will notice that added definitions will create entries within your selected definition file. You may edit these entries freely to add/edit your definitions, but if you do so, make sure to adhere strictly to the definition rules below. It is recommended that you read through the definition rules first before manually editing the definition files.
Currently, there are two types of definition files: consolidated
and atomic
.
The type of definition file is specified in the def-type
frontmatter (or property) of a file.
For all definition files you create, the def-type
frontmatter should be set to either 'consolidated' or 'atomic'.
For compatibility reasons, a file is treated to be consolidated
if the def-type
frontmatter is not specified (but this is not guaranteed to remain the same in subsequent releases, so always specify the frontmatter when creating a new definition file).
For convenience, use the commands provided to add the def-type
frontmatter.
A consolidated
file type refers to a file that can contain many definitions.
Register a definition file by specifying the def-type: consolidated
frontmatter, or using the Register consolidated definition file
command when the file is active.
A consolidated
definition file is parsed according to the following rules:
# <PHRASE>
. This is rendered as a markdown header in Obsidian.*alias*
. This is rendered as italics in Obsidian.---
is used as a divider to separate definition blocks. This is rendered as a delimiting line in Obsidian. (This divider can be configured in the settings to recognise three underscores ___
as well)Example definition file:
Word1
alias of word1
Definition of word1. This definition can span several lines. It will end when the divider is reached.
Word2
Notice that there is no alias here as it is optional. The last word in the file does not need to have a divider, although it is still valid to have one.
Phrase with multiple words
You can also define a phrase containing multiple words.
Markdown support
Markdown is supported so you can do things like including italics or bold words.
An atomic
definition file refers to a file that contains only one definition.
Register an atomic definition file by specifying the def-type: atomic
frontmatter, or using the Register atomic definition file
command when the file is active.
An atomic
definition file is parsed according to the following rules:
aliases
frontmatter as a list. In source, it should look something like this:
---
aliases:
- alias1
- alias2
---
TLDR: "Context" is synonymous with a definition file. By specifying a context, you specify that you want to use specific definition file(s) to source your definitions for the current note.
Definition context refers to the repository of definitions that are available for the currently active note. By default, all notes have no context (you can think of this as being globally-scoped). This means that your newly-created notes will always have access to the combination of all definitions defined in your definition files.
This behaviour can be overridden by specifying the "context" of your note. Each definition file that you have is taken to be a separate context (hence your definitions should be structured accordingly). Once context(s) are declared for a note, it will only retrieve definitions from the specified contexts. You can think of this as having a local scope for the note. The note now sees only a limited subset of all your definitions.
To easily add context to your note:
Add definition context
commandYou can do this multiple times to add multiple contexts.
Add definition context
adds to the properties of your note.
Specifically, it adds to the def-context
property, which is a List
type containing a list of file paths corresponding to the selected definition files.
In source, it will look something like this:
---
def-context:
- definitions/def1.md
- definitions/def2.md
---
You can edit your properties directly, although for convenience, it is recommended to use the Add definition context
command to add contexts as it is easy to get file paths wrong.
To remove contexts, simply remove the file path from the def-context
property.
Or if you want to remove all contexts, you can delete the def-context
property altogether.
Whenever you find that the plugin is not detecting certain definitions or definition files, run the Refresh definitions
command to manually get the plugin to read your definition files.
I welcome any feedback on how to improve this tool. Do let me know by opening a Github issue if you find any bugs, or have any ideas for features or improvements.
If you're a programmer and would like to see certain features implemented, I welcome and would be grateful for contributions. If you are interested, please do let me know in the issue thread.