Comments (5)
Here is my wiki.vim settings:
Did you forget the g:wiki_root
setting? I assume it is also defined?
Here is my example
index.md
...work.md
.
Do I understand correctly that the files you are referring to are placed like this?
.
├── index.md
└── work.md
├── work
│ ├── project1.md
│ └── project2.md
That is, you are not describing issues with using two separate wiki's, but rather with how links work within a single wiki with multiple folder levels. I that right?
How can I specify relative path to current note when creating new files?
Links are generally relative to the path of the current file. So, from project1.md
, a link like [project2](project2)
should work as expected. But from work.md
, links to files inside the work
folder needs the work/
prefix.
Is there any way to make
wiki.vim
respect the folder of current wiki when creating new files? Otherwise I have to make sure to include the parent folder each time when I create a new link.
I think this is how it is supposed to work already, and it seems to work like that for me.
By the way, could you share some insights what is the better way to arrange notes for different projects? Do you put all of them inside the wiki root folder or create a folder to store notes for each projects?
Good question. I keep a rather flat structure, but I do agree that it makes sense to keep project specific notes within a project folder. The main drawback is that information may be related to more than a single project or topic. That is, you might end up writing redundant/duplicate notes. But if you are good at organizing this well, I think you could avoid issues like this.
from wiki.vim.
Thanks for your explanation!
Did you forget the g:wiki_root setting? I assume it is also defined?
Sorry I forgot to put the g:wiki_root
setting here. Yes, it is defined correctly.
Do I understand correctly that the files you are referring to are placed like this?
. ├── index.md └── work.md ├── work │ ├── project1.md │ └── project2.md
That is, you are not describing issues with using two separate wiki's, but rather with how links work within a single wiki with multiple folder levels. I that right?
Exactly. This structure is what I want to achieve.
I think this is how it is supposed to work already, and it seems to work like that for me.
Links are generally relative to the path of the current file. So, from project1.md, a link like project2 should work as expected. But from work.md, links to files inside the work folder needs the work/ prefix.
That's right. So if I understand it right, all new notes will be created inside the same folder of current note. Previously I was also trying to find a way to create new notes inside the folder with the same name as its parent folder, e.g.:
.
├───index.md
│
└───work
├───work.md
│
├───project1
│ ├───project1.md
│ │
│ ├───materials
│ └───meetings
└───project2
├───project2.md
│
├───materials
└───meetings
Probably this has to be achieved by adding folder prefix. This may also be out of scope of a wiki plugin.
Good question. I keep a rather flat structure, but I do agree that it makes sense to keep project specific notes within a project folder. The main drawback is that information may be related to more than a single project or topic. That is, you might end up writing redundant/duplicate notes. But if you are good at organizing this well, I think you could avoid issues like this.
I agree that a project-centric structure does need taking more care on organizing things, but that may pay off in the long run.
Thanks for this awesome plugin!
from wiki.vim.
Exactly. This structure is what I want to achieve.
Good, then I understand correctly.
Ok, so: Links are by default relative to the current file. However, you can root them to the wiki root by prepending /
. I think this works as expected, at least it does for me. If you should find that it does not work like this, then I think we have a bug.
In this updated example:
.
├───index.md
│
└───work
├───work.md
│
├───project1
│ ├───project1.md
│ │
│ ├───materials
│ └───meetings
│
└───project2
├───project2.md
│
├───materials
└───meetings
Here you would use a link like [](work/work)
inside your index.md
. Inside work.md
, you would use a link like [](project1/project1)
or [](project2/project2)
. From project1.md
, you could link back to work.md
with [](../work.md)
or [](/work/work.md)
.
However, note that the link syntax [](work/)
will expand to [](work/index)
.
Probably this has to be achieved by adding folder prefix. This may also be out of scope of a wiki plugin.
I am not quite sure what you mean here. Are you saying that the links are somehow not working as I am explaining? If so, then I think it may be a bug and I'll be happy to try and fix it.
Thanks for this awesome plugin!
You're welcome, I'm happy you like it! I find it very useful for my own workflow, and it makes me happy to hear that it is useful to others as well.
from wiki.vim.
Here you would use a link like
[](work/work)
inside yourindex.md
. Insidework.md
, you would use a link like[](project1/project1)
or[](project2/project2)
. Fromproject1.md
, you could link back towork.md
with[](../work.md)
or[](/work/work.md)
.
Thank you for this hint! Right now it works 100% as I want.
Since this issue seems more like questions on usage instead of actual bugs, I will close it now.
Thanks for you help.
from wiki.vim.
Thank you for this hint! Right now it works 100% as I want.
Great, happy to hear it! :)
from wiki.vim.
Related Issues (20)
- citekey: link to BibDesk (in wiki.vim too) [feature request] HOT 27
- Feature Request: Auto-Copy Text for WikiLinkFollow HOT 10
- Default keybinds not loading when attempting to use `adoc` HOT 3
- How can I avoid affecting certain default templates of wiki.vim HOT 3
- Possible to use one prefix to delimit a line of tags? HOT 3
- WikITocGenerate for more filetypes HOT 3
- WikiJournalNext / WikiJournalPrev navigate out of journal folder HOT 7
- Backlinks don't update immediately HOT 16
- WikiExport: cmd should use double quote under windows HOT 18
- How can g:wiki_export be configured to support HTML, docx, and PDF? HOT 4
- Using custom resolver breaks WikiJournalNext/WikiJournalPrev HOT 10
- Disabling default mappings might be broken HOT 2
- Provide dictionaries containing default mappings HOT 6
- Enhancement request for WikiJournalIndex: reverse order and update HOT 3
- Is it possible for wiki-link-types to support jumping to Vim help? HOT 7
- WikiTags can't work under gvim 9.1 or neovim 0.10 + win 10 pro HOT 19
- Infinite loop on template rendering if function starts at index 0 in template file HOT 1
- HTML text objects are overwritten by text objects for link texts HOT 3
- WikiLinkAdd in visual mode HOT 12
- Add completion source for `:WikiOpen` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wiki.vim.