dailynotes.nvim allows you to create "daily notes" (notes of the form yyyy-mm-dd.md) and iterate between them.
Supported file types: markdown, vimwiki
Other notetaking apps like Obsidian and Vscode Foam have this feature and after switching over to vim for notetaking it was one of the features I missed.
:Daily opens todays daily note
:DailyNext opens the next daily note (won't go past todays date)
:DailyPrev opens the previous daily note
if you miss :NextDaily and :PrevDaily
Using packer.nvim
Add use 'kperath/dailynotes.nvim' to your packer plugins file.
require "dailynotes".setup({
path = '<path to your daily notes>/'
})Using vim-plug
Plug 'kperath/dailynotes.nvim'
lua << EOF
require "dailynotes".setup({
path = '<path to your daily notes>/'
})
EOFIf you want to pick a specific tag or branch
Note: Assuming you have a centralized place where you keep your daily notes, it's recommended to set the path or by default your notes will be created in whatever directory you open vim.
Additional options and their default values:
require "dailynotes".setup({
...
notifications = true,
-- if disabled no configurations changes will be announced
legacy = false,
-- enables v0.1.0 options
dailyNotesPath = ''
-- only used if "legacy" is true and "path" is not set
})Enables backwards compatibility with v0.1.0 supporting:
:NextDailycommand (same as:DailyNext):PrevDailycommand (same as:DailyPrev)dailyNotesPathoption (same aspathwhich if set takes precedence over this)
- clone the repository
- make your changes
- from the project root run
nvim --clean --cmd "set rtp+=./"to open nvim from scratch with only this plugin in the run time path
-- branch
use {
'kperath/dailynotes.nvim',
branch = '<experimental branch>',
}
-- tag
use {
'kperath/dailynotes.nvim',
tag = 'v0.1.0',
}" branch
Plug 'kperath/dailynotes.nvim', { 'branch': '<experimental branch>' }
" tag
Plug 'kperath/dailynotes.nvim', { 'tag': 'v0.1.0' }This is my first Neovim plugin and besides the documentation, I used the following references:
- "How to Write Neovim Plugins in Lua" which I found here
- telescope.nvim
- nightfox.nvim