copy files to denote directory

This commit is contained in:
2026-02-28 15:02:09 +01:00
parent 4fb6e977ff
commit dfc15def2b
3 changed files with 29 additions and 0 deletions

View File

@@ -85,3 +85,9 @@ function denote#frontmatter#setTags(filename, tags)
call map(l:frontmatter, { _, v -> v =~ '^\(#+file\)\?tags' ? l:tagline : v})
call setbufline(a:filename, 1, l:frontmatter)
endfunction
" Prepend frontmatter to file
function denote#frontmatter#prepend(filename, id, title, tags=[])
let l:frontmatter = denote#frontmatter#new(fnamemodify(a:filename, ':t'), a:id, a:title, a:tags)
call appendbufline(a:filename, 0, l:frontmatter)
endfunction