You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When ZettelNew is called from outside a wiki, the note file is created without a file extension, at least in my very basic setup:
let g:vimwiki_list = [{'path': '~/vimwiki/', 'syntax': 'markdown', 'ext': 'md'}]
let g:vimwiki_global_ext = 0
let g:zettel_options = [ {"rel_path" : "zettel/" } ]
I don't know much about vimscript, so no pull request, but for a quick fix, I added the file extension from the wiki config in
autoload/zettel/vimwiki.vim in function zettel#vimwiki#create
567 let zettelpath = zettel#vimwiki#path(a:wiki_nr)
568 " add extension
569 let ext = vimwiki#vars#get_wikilocal('ext', vimwiki#vars#get_bufferlocal('wiki_nr'))
570 execute(':e ' . zettelpath . format . ext)
The text was updated successfully, but these errors were encountered:
Thanks for the report and for the proposed fix. It seems to work. I've modified it a bit, as the wiki_nr should be passed to zettel#vimwiki#create as a parameter.
Thanks you. There is still an Issue with ZettelGenerateLinks though. It generates Links to the main wiki dir, not the rel_path. So whenever i click those links, it opens empty files, not the notes. But did not have the time to dig deeper into the code yet. I think this plugin is much more usefull, when ZettelNew can be called whereever you are.
When ZettelNew is called from outside a wiki, the note file is created without a file extension, at least in my very basic setup:
I don't know much about vimscript, so no pull request, but for a quick fix, I added the file extension from the wiki config in
autoload/zettel/vimwiki.vim in function zettel#vimwiki#create
The text was updated successfully, but these errors were encountered: