functionality to add new notes

This commit is contained in:
2026-02-18 17:08:24 +01:00
parent 81c5d3f849
commit 717f44425b
3 changed files with 99 additions and 1 deletions

View File

@@ -32,5 +32,14 @@ endfunction
" Return the note tags from the filename as a list.
function denote#meta#noteTagsFromFile(filename)
return a:filename->matchstr("__\\zs.\\{-\\}\\ze\\(==\\|@@\\|--\\|\\..\\)")->split("_")
\ ?? []
endfunction
" Identifier creation
function denote#meta#identifier_generate()
if g:denote_identifier_fun
return execute "call " .. g:denote_identifier_fun .. "()"
endif
return exists("*strftime")
\ ? strftime("%Y%m%dT%H%M%S")
\ : rand()
endfunction