Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I change the base directory of VimWiki? #1424

Open
AlGoLuc opened this issue Aug 8, 2024 · 3 comments
Open

How can I change the base directory of VimWiki? #1424

AlGoLuc opened this issue Aug 8, 2024 · 3 comments

Comments

@AlGoLuc
Copy link

AlGoLuc commented Aug 8, 2024

For example to ~/MyDocs/VimWiki.
I have set the path in .vimrc with:
let g:vimwiki_list = [{'path': '~/MyDocs/VimWiki/'}]
but VimWiki ignores it and with <leader>ww, it insists on creating ~/vimwiki/" and if I don't accept it, it aborts.

:VimwikiShowVersion:

Version: 2024.01.24
Os: Linux
Vim: 900
Branch: dev
Revision: 705ad1e
Date: 2024-06-23 12:11:20 -0400

Thanks for your time.

@elliottw
Copy link

Not a solution, more of a work-around, but have you tried the multi-wiki syntax outlined in the manual?
from my .vimrc:

let e01 = {}
let e01.name= 'e01'
let e01.path = '~/vimwiki'
let l01 = {}
let l01.name= 'l01'
let l01.path = '~/likenowdev.github.io/wiki'
...
let g:vimwiki_list = [e01, l01, pmp]

@AlGoLuc
Copy link
Author

AlGoLuc commented Aug 17, 2024

I will give it a try. But this is also a compromise solution that messes up the .vimrc... even more! I don't like the Windows style: everything in «My documents» }:-)))

Thanks for the suggestion!

@MartyLake
Copy link
Contributor

I have a custom base directory for VimWiki, with an env variable to account for different operating systems, and it works great:

let g:vimwiki_list = [{\"path": $VIMWIKI."/Wiki"}]

maybe it has to do with ~ extension ? maybe you could try :

 let g:vimwiki_list = [{'path': $HOME.'/MyDocs/VimWiki/'}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants