Skip to content

[Feature Request] Enable wiki.vim handles separate journal directory #273

@mizhozan

Description

@mizhozan

First, can we have a separate directory? like

let g:wiki_root = ['~/Work/Notes', '~/Another/path/Notes', '~/Journals']
let g:wiki_filetypes = ['md',  'wiki']
let g:wiki_link_extension = '.md'
let g:wiki_global_load = 0
let g:wiki_link_target_type = 'md'
let g:wiki_journal = {
          \ 'name': '~/Journals',
          \ 'frequency': 'daily',
          \}

I have maintained a Journal directory for years; a separate Journal dir is better for me. I also don't want to overwhelm note searches with those usually useless journal files. I can use wiki.vim exclusively for my primary notes and forget about journals or create a symlink in the primary note if I want to combine the two. But it's beneficial having two separated.

Possible Solution

With multi-root support, in a minimalistic scenario:

  • We designate a separate daily journal (or calendar) directory. Users can define any path as their journal directory. The default value would be the same as the current (relative to the first note directory). I think only journal-related functions like calculating next week or opening a daily journal would be affected.
  • All goodies of the wiki.vim like for creating a local link is enabled on all given directories if not enabled globally for all markdown files (like config example above).
  • wiki.vim when creating a new link, it only considers the current note directory, i.e., it acts like there is one single root directory and is quite similar to the current situation. So if it operates on NoteDir1/a_note.md, it acts like a single root with note NoteDir1 as the only root directory. Close to the current implementation.
  • For the cross-link situation, unlike vimwiki multi-root that combine all root directories, wiki.vim can safely ignore the notion of cross-links. Those cross-links can be handled with an absolute path. We might imagine some helper function as well. I have a simple fzf based command associated with a vimkey that shows me the notes in other/any directory and creates a markdown link with an absolute path out of it. Having two separate note directory kind of means separation of concern as well so cross-link is an exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions