wiki.vim fork

Development notes for my development fork of wiki.vim

Reasoning

This Github repo is my development fork for the wikivim plugin. This is to allow me to contribute on-topic fixes/features to the core codebase that 1) I want to have personally, or 2) are features I want in Vim-roam but I think are in the scope of the original plugin.

Contributions

Current accepted contributions include

  • g:wiki_write_on_nav: option for automatically saving files when you navigate away from them using a wiki link. This was a default option in the Vimwiki plugin, and I found myself wishing I had the same using wikivim. PR link
  • Fixing relative link expansion: there appeared to be a few issues with the expansion of relative link paths in certain situations. This was fixed with a simple file path expansion. PR link
  • Small journal path fix: remove extra / before journal name, making empty journal names look more natural when opening files. This has some downstream effects, like overriding some global mappings. Issue has been raised here. [Turns out this would be solved by the commit above in this list; the simplify() method removes the extra forward slash from the journal path.] As mentioned this was originally raised as an issue, but Lervag incorporated it with a simple “map conflict” commit. The original issue description:
    • <Leader>wn journal: overwrites the regular file creation shortcut with the JournalCopyToNext method when inside of the journal. With a flat journal, this applies everywhere. In either case, I don’t think it makes sense, since I very frequently want to create files from within a journal page. (resolved with “command overlap” commit to wiki.vim master).

Changes currently in the pipeline:

  • Transforming links before opening the target file. This is to help significantly reduce wasted text and allow for more prose-like links, especially in files with many links or particular long link names. I’ve been hesitant on this because it seems a bit contrary to most users’ wants e.g. could be confusing, is non-standard. Nevertheless it’s a QOL of change that I personally don’t have to give up, and thus will keep it implemented in my fork. I would simply put this in Vim-roam, but it’s difficult if not impossible to try and make a core change to something like the URL parsing methods from the outside. Need to consider just directing vim-roam users to my wiki.vim fork as a base.

Issues

Current issues I have with the core plugin (outside the scope of Vim-roam):

  • opening files with fzf does not add pages to the queue for visiting with <BS>. The listings also show up with a slash in front of the names.
  • Appears to be a current bug when opening links that reference a reference link. Not sure if it’s my fork or a conflict. Will sync fork with upstream and find out what’s up.