Has anyone made a wiki in Kakoune?

Kakoune itself already has a wiki on GitHub, I’m talking about a wiki actually inside Kakoune itself. I imagine the features would be something like:

  • In normal mode, hitting Enter when the primary cursor is on text inside double-square-brackets would open the corresponding file - so if the cursor was on [[New York]] and I hit Enter, Kakoune would open/switch to New York.md in the same directory.
  • Autocompleting based on filenames, so if New York.md exists and I type [[N in insert mode, [[New York]] is a completion.
  • A “what links here” feature, which would basically be :grep "\[\[%var{bufname}\]\]" except also trimming the file extension.
  • A “broken links” feature that finds all the links that don’t have a corresponding file.
  • A “orphan pages” feature that finds all the pages that nobody links to.
  • For bonus points, support page templates, so if I follow a link [[City:New York]] and City:New York.md doesn’t exist, the new page will start as a copy of City:template.md rather than as a blank document.
    • Template pages don’t count as orphan pages.

I’m cool with other wiki-link syntaxes, it’s just that the double-square-brackets thing happens to be supported by Python Markdown so I’m used to it.

I would like this, also.

As a suggestion, if anybody is interested in implementing such a thing: AsciiDoc for my blog and writing (well, except I keep not writing), and since AsciiDoc allows definition of new macros, it should be easy to make wiki:SomePage[].

When I was a Vim user I did not use wiki plugins. Instead I’ve used gf feature, that selected path under cursor and jumed to the file, as well as tag files for jumping to sections. Kakoune has builtin tag support, and has gf which can be made a bit smarter and recursive like this.

This allows having files in a tree (or not) structure, with headings accessed via tags (maybe one could define a grep function that will act like gf but for headers) and we basically can use any markup language for making our own wikis.

That’s what I did in Vim. But I’ve decided to go org mode for this task in the end.

Kinda, it’s pretty basic tho

1 Like