michal-h21 / vim-zettel

VimWiki addon for managing notes according to Zettelkasten method
MIT License
564 stars 73 forks source link

Zettels are not created in the current subfolder. #140

Open vacuumbeef opened 11 months ago

vacuumbeef commented 11 months ago

Maybe I'm not understanding https://github.com/michal-h21/vim-zettel/pull/139 correctly, but

If I'm in ~/wiki1/testpath/index.md - :ZettelNew creates ~/wiki1/zettelname.md

But that pull request made me think it should create ~/wiki1/testpath/zettelname.md

I'm testing it with the configuration mentioned in that PR:

let g:vimwiki_list = [{"path": "~/wiki1"},{"path":"~/wiki2"}]
let g:zettel_options = [{},{'rel_path': 'zettel/'}]

Am I wrong?

michal-h21 commented 11 months ago

It obviously doesn't work. And also, if you are in a note in the subdirectory, and link to a note in the parent directory, it doesn't insert correct link, which I think worked at some point. @ferdinandyb

vacuumbeef commented 11 months ago

Looks like I got all of it wrong, sorry. Closing?

michal-h21 commented 11 months ago

I think there is still the problem that you will get a wrong link when you link from subdir to the parent dir. So there is a still a lot of issues to be solved regarding subdirs. I think this can be left open.

ferdinandyb commented 11 months ago

I'll check next week what's going on.

ferdinandyb commented 11 months ago

@vacuumbeef given your config, when you are in wiki1 the correct zettel path is the root of the wiki, so it seems to work as intended. To get the behaviour you want you need to set the rel_path for wiki1 as well:

let g:vimwiki_list = [{"path": "~/wiki1"},{"path":"~/wiki2"}]
let g:zettel_options = [{'rel_path': 'zettel/'},{'rel_path': 'zettel/'}]

@michal-h21 I think currently vim-zettel still assumes that the zettel itself is flat, so all the notes are flat where rel_path points. How did you want to insert a link? I think if you want to insert a link to something outside of the zettel you might need to use Vimwiki's linking directly? Or maybe it's just broken. Can you tell me how to repro?

michal-h21 commented 11 months ago

@ferdinandyb I think the issue here is the same as this one. @rfhlmn offered help, so hopefully, he will succeed.

ferdinandyb commented 11 months ago

Sounds good :)