Open abers opened 6 years ago
@abers that is a good idea. It is now possible to configure used template and custom variables for the front matter. The configuration can be set per wiki, so it can use a different templates for Markdown and Vimwiki syntaxes.
Sample configuration:
let g:vimwiki_list = [{'path':'~/scratchbox/vimwiki/markdown/','ext':'md','syntax':'markdown',}, {"path":"~/scratchbox/vimwiki/wiki/"}]
let g:zettel_options = [{"front_matter" : {"tags" : ""}, "template" : "~/mytemplate.tpl"}]
The example requires tags
field in the YAML front matter and uses ~/mytemplate.tpl
file as a template for the Markdown syntax. There is no configuration for the second Wiki. The order of configurations in g:zettel_options
must be same as the order of configured wikis in g:vimwiki_list
Thanks! Given it a test and all is working perfectly.
Great! I've also fixed other things. Do you have ideas for more features?
No ideas that are fully formed. Unsure how easy or not it would be in vimscript but I was planning to have a go at writing a Python script that would scan through all the files in a directory, check which ones are linked to which, and then return a list of zettels that have no links or the links are broken / have incorrect titles. Could then build off of that to add features so that if the title of a zettel changes you can quickly search and replace all links for it, return all zettels that reference another one, etc.
Something similar is in fact also on my ToDo list, I want to create some sort of inbox, where all notes not referenced by any other note would be collected. I am still not sure which language to choose, I feel that Vimscript may be not fast enough and it is really hard to debug (at least for me). If you are willing to create such tool in Python, it would be really great.
I am very much a beginner Python user so may be some time till I get around to it. However, will let you know if and when I do. It might be worth creating separate threads for each feature idea, with basic details in terms of function, rationale, planned way to implement it. Then others can chip in with ideas for refining or extending it etc.
Have you seen sublime_zk, the zettelkatsten plugin for Sublime Text? Might be a few feature ideas to garner from it. Also unsure if you are a member already but there is a Research Hacking slack group of academics interested in improving their digital workflows. A lot of early discussion on the group was around the zettelkasten method, and there are a small number of vim users on it. May be worth asking folk on there if there are any features they'd be interested in.
I was wondering whether it would be feasible to add options to allow users to modify the default template for new zettels. For example, currently when a new zettel is created it generates a YAML with title and date. It would useful if users could specify in .vimrc a list of any additional items to include in the YAML (e.g. tags) as well as another list for any section headers to automatically add with specified header level (e.g. # or ##) and 1-2 new lines separating them. For example, I try to ensure every zettel has a "Related" section for links to related zettels and a "References" section for any books, journal articles, and so on referenced in the zettel. Would be handy if there were automatically added to any new zettel created.