Open khanmurad opened 4 years ago
@khanmurad the problem is that front_matter
is a dictionary, which doesn't have order in Vim, so you will always get the random sorting. I think I can change the code to accept a list instead of dictionary. It will enable the correct ordering, but the downside is that the specification will be more cumbersome (something like "front_matter" : [ ["csl", "...."], ["bibliography", "..."], ["tags", "....]]`).
It is now possible to use lists, like:
let g:zettel_options = [{"front_matter" : [[ "tags" , ""],[ "csl", "'/references/apa-tr.csl'"], ["bibliography", "'/references/zettel.bib'"]] }, "template" : "~/.vim/templates/zettel.tpl"}]
It is not as nice as a dictionary, but it is the only way to support the ordering.
I would like to insert the preamble some additional options such as default bibtex file etc. My
.vimrc
setting is the following:It does not matter in what order I put it, the preamble comes out the same:
Whereas, I want the
tags:
at the end:I tried the following with no success:
It seems that it sorts additional options by the number of characters in option names (may be not). How can I force it to put
tags:
at the end of the preamble?