Open johangustafsson opened 3 years ago
I support this suggestion, I was about to open an issue for this exact same feature :)
That would be a really great thing to have!
I was able to crate :ZettelOpen
command as global. I've also added a new command, :ZettelSetActiveWiki
. You can select default wiki using this command. It can be useful when you have multiple wikis. It works not only for :ZettelOpen
, but also for :ZettelInsertNote
.
:ZettelNew
failed with error when I tried to move it, I need to investigate more what is the problem.
Thanks. I am still not getting it to work, however. When I try ZettelOpen, it searches fine, but then it opens a file in the directory of my current buffer rather than the Zettelkasten directory.
Really? Do you get any error messages? I've updated the function with some debugging messages, can you copy them from :messages
prompt?
From the debug messages, it looks like dir and wikidir are fine; they both point to my Zettelkasten directory:
[DEBUG] filename: 2009230454.md [DEBUG] wikiname: 2009230454 [DEBUG] dir: /Users/johangustafsson/Dropbox/Notes/Zettelkasten/ [DEBUG] wikidir: /Users/johangustafsson/Dropbox/Notes/Zettelkasten/
But I still get a new buffer called "2009230454.md" in the current directory rather than the Zettelkasten directory.
Hi Michal,
I wish I could run ZettelOpen and ZettelNew as global commands from any buffer. But it seems that, currently, only ZettelCapture and ZettelInsertNote are global commands available from non-VimWiki buffers.
Best, Johan