Kitaab: IncDown Vimwiki Replacement / Rebuild

meta dev idea lua vim

published 2023-07-18 17:28

updated 2023-07-18 19:18

= More Thoughts on in-place renaming files = Thinking about using %slug or %title to rename files. Let's say I use %title. We've now renamed all notes so that their filename matches whatever metadata is in the %title tag. and then, now, for one note, we create a new section, and change the title tag. Now we may once more have a broken link. Should we drop another link to the newly named file in the older one? Sounds like we'll always copy files, rather than rename them. And when a file gets copied, we do overwrite the old contents to point to the new file. I'm fairly certain that vim-zettel does indeed do this. This notion of not breaking links does add some complexity. Especially when we consider that the website built from these notes will also need to account for this. I wonder if HTML pages can set redirect? Presumably they can.

= What about functions? = I have one special function ▕▔░▝ thing, that I actually really like. It's on and is the name generation bit. I wonder if I can drop executable (through which language? lua / fnl / janet? Some other micro lisp? Where is it being called from?) scripts in a certain location, and have some sorta builder run it and replace the value as part of the spec? I suppose it doesn't make much sense to add it to the spec itself. Would it make sense to include in the vim plugin? Should it be a seperate plugin? Something Comby-like but for vim? If I did do that, is there much benefit to me?

Tasks + Calendar

I'd also like to be able to turn a note into a task, again with the correct links in place for task-note. This should synergize with link forwarding parsing whatever.

Because IncDown is how I'm already building my notes, and obviously isn't really supported by any of the vim plugins I'm using, I wish to rebuild vimwiki in my own image. Yay, more projects!

Keep vim-zettel's new notes don't need names, but instead of naming notes by date-time, use a some hashing function. Then either by adding metadata tag (probably %slug or %title, and probably only for the "root" section?), use the new extension to rcname the file to match the slug. But because cool links don't break, we'll keep the filename (the hash) and replace all the contents with a wikilink to the new file name. Then this extension can also be aware of that, and parse IncDown (.incd? .incy? .ind?) filetypes that are secretly just links, and actually open the linked file instead. Might be a bit janky, but we'll try. Remember to close the buffer too (if this is a vim specific thing that happens). I'm fairly certain there are commands to do that on Vim-Zettel

I'd need to lift entirely ( / re-write because let's be real i'm using lua) quite a few things from Vimwiki / Vim-Zettel / TeleKasten

  • Link Creation (vimwiki)
  • Tag Handling (vimwiki) Are there even other parts of vimwiki that I use?

I would love to have some sort of taskwarrior integration across my task-note script. Could be something simple like having taskwarrior open in terminal inside nvim, and pressing enter opens / creates / runs in a way that it opens the note associated with the task in a split in vim. This would probably be a different plugin to whatever i decide to name the incdown-wiki thing, but will form part of Kitaab itself.

On this note, I would also like some form of people / contact management integrated into Kitaab. Single Source of Input for notes. That should include the people I care about :3