A simple Neovim note taking plugin with daily notes, task tracking and syntax highlighting.
https://github.com/gsuuon/note.nvim/assets/6422188/4f186db5-7938-4c45-b791-c1c8fbf88ff7
note.nvim makes it easy to take working notes and track tasks. It adds commands to help manipulate task items, create daily notes, and navigate within (and between) notes.
Write indent-scoped ideas / tasks / notes. You can set a template for daily notes (:Note
) by creating [note_root]/.note/daily_template
. You can also add spaces (config.spaces = { '~', '~/myproject' }
) to set up different note root directories.
Upgrades with some simple OpenAI gpt prompts if llm.nvim is installed.
A marker indicates their type or status. Indented tasks establish scope and indented properties attach to the outer item. Normal text that are't items will just be ignored by the item commands.
>
— current-
— pending.
— done=
— paused,
— cancelled
*
— info[
— label
#
— section -- Not indented - the number of #'s mean depth like markdown.
Some special symbols will also highlight to help with readability:
->
— flow -- indicates one thing flowing to another<-
— select -- indicates selecting one of a list(?)
— question -- draw attention to something confusing(!)
— warn -- draw attention to something important
Links to items can be created with [(<file>)<marker>|<body>]
. They're shortcuts that search for a target item, first by searching downwards from the link and then upwards. The file part can point to a specific commit.
<body>
behaves like a case-insensitive string.match
against items.(<file>)
if present links to that file relative to the current file - the path is joined with the current file's directory. If the file part starts with /
then the path is resolved relative to the note root.(<file>@<commit>)
links to the file at a specific commit. The git root is expected to be the note root. <marker>
is a specific marker (e.g. -
, *
) or one of these special characters:s
— section -- matches any number of #'sp
— property -- matches any property markert
— task -- matches any task marker
For example:
[t|clean]
links to a task containing 'clean'[(chores)s|daily]
links to a file in the same directory as the current file named 'chores' and finds the first section with 'daily'[(/budget)t|groceries]
links to the 'budget' file in the note root and finds the first 'groceries' task
- Take out the trash
[ chore
Here Take out the trash
is labeled as a [ chore
.
- Cleanup house
- Wash dishes
> Pick up toys
Here Pick up toys
is the current (>
) task and is part of Cleanup house
.
[t|monday]
# Gym
- Monday
- Squats
[(../health)s|goal]
Here [t|monday]
links to the - Monday
task and [(../health)s|goal]
links to the the 'health' file up one directory at a section matching goal
.
use 'gsuuon/note.nvim'
With lazy.nvim:
{
'gsuuon/note.nvim',
opts = {
-- Spaces are note roots. These directories should contain a `./notes` directory (will be made if not).
-- Defaults to { '~' }.
spaces = {
'~',
-- '~/projects/foo'
},
-- Set keymap = false to disable keymapping
-- keymap = {
-- prefix = '<leader>n'
-- }
},
cmd = 'Note',
ft = 'note'
}
Note <path>
— Create or open the daily note if no arguments. Tab completes arguments with files from current note rootNoteIndex
— Edit the note index of the current space
NoteCurrentItem
— Jump to the current task (>
)NoteFindItem <marker> <body pattern>
— Jump to a matching item. Tab completes if marker is s
with available sections in fileNoteMarkItem <marker>
— Change the marker of the item under cursor. Only for task or property markers. Dot-repeatable.NoteMarkItemChildren <marker>
— The cursor item and all children with a matching marker get markedNoteGoLink
— Follow the link under cursorNoteTime <marker?>
— Insert a timestamped item with marker (defaults to *
)
NoteReport
— Notify with a summary of the current noteNoteLinkPinCommit
— Modify the link under the cursor to pin it to the current commit (and absolute path of current file if not specified)
NoteRefCreate
— Create a ref for the item under the cursorNoteRefPaste
— Paste a link to the last created refNoteRefYank
— Yank the ref for the item under the cursor to use with NoteRefPaste
*Linked*
commands add a ref link from the source item to the target and from target to the sourceNoteItemLinkedYank
— Yank the item under the cursor. Creates a ref if one doesn't existNoteItemLinkedPaste
— Paste the last LinkedYank itemNoteItemLinkToday <marker> <body>
— Yank the item under the cursor and add it as a child item of marker body in the daily note
NotePrevious
— Edit the previous daily noteNoteNext
— Edit the next daily note
<prefix>t
— NoteTime<prefix>l
— NoteGoLink<prefix>c
— NoteCurrentItem<prefix>m<marker>
— NoteMarkItem <prefix>M<marker>
— NoteMarkItemChildren <prefix>f<marker>
— NoteFindItem .
<prefix>n
— NoteNext<prefix>p
— NotePrevious