Closed johangustafsson closed 4 years ago
Good idea! I have added support for functions in the front_matter
option. It can be used in this way:
function! s:insert_id()
if exists("g:zettel_current_id")
return g:zettel_current_id
else
return "unnamed"
endif
endfunction
let g:zettel_options = [{"front_matter" :
[["tags" , ":hello:"],
[ "id" , function("s:insert_id")]]
}]
Thanks! It works.
I wish there was a way to automatically add the zettel ID to the YAML header. Using %date need not yield the same result.