vim users: how did you set up vim for zettelkasten?
Hi everybody,
i use vim (actually neovim) for everything writing. Which makes vim my first choice for a zettelkasten implementation. Now I'm curious how others handle their zettelkasten with vim.
- How does your setup look like? What plug-ins do you use? What have you added to your vimrc as configurations for your zettelkasten?
- How does your workflow look like? How to do you actually use vim as a zettelkasten?
Many thanks for your input and cheers
agata
Howdy, Stranger!
Comments
I use MacVim as the external editor associated with The Archive app.
If you are on Mac, you can use https://lord.io/blog/2014/alfred-quicknote/ with Vim. Vim is the editor and the Alfred workflow implements the search function.
Since I am using vim in combination with vimwiki and some self-written scripts for my zettelkasten, your post was motivation for me to create a short no-sound video. It basically shows:
1) parts of my vimrc (not all of it is relevant, actually just the F2/F4 macros)
2) my zettelkasten index and the keyword list (3 windows of vim open simulateously)
3) me navigating in the notes
4) me creating a new note and running the update script in the background (which is just some clumsy shell script I wrote myself to automatically update the index site, backlinks and keywords)
Video: https://www.bitchute.com/video/wlFZJ8ltQTgg/
I made a whole big personal program for this see github.
It allows for many things I like. For example, I've got this 'neighbourhood' command that allows me to use fzf to navigate to wherever the current zettel links to, the zettels that link to the current zettel and to their links. It is really fun way for delving into the zettelkasten.
Also, Luhmann talks about his zettelkasten 'speaking' to him. A digital zettelkasten can quite literally do that nowadays. Also, a digital system can make active demands, such as asking for links to unlinked zettels or suggesting that too big zettels are broken apart.
I found the speaking part quite useless, but making the system occasionally demand more links is really nice in practise.
I think that Zettelkasten makes for an excellent personal programming project. Since it's personal, it's ok if it occasionally misbehaves and it also stands to greatly benefit from personalization.
Many thanks for your vid. It is very helpful.
I see you have vimwiki, vim-zettelkasten and notational fzf configured. These are basically the plugins I use myself.
Now, I have a rather impertinent question: Is there any way I could get my hands on your script?
I don't have much experience with shell scripts, especially those pertaining to vim, thus the task of writing one on my own from scratch seems rather daunting.
Cheers
agata
I so have to dive into that!
Oh no it's written in Haskell 😭 That'll take a while to unpack
Author at Zettelkasten.de • https://christiantietze.de/
Well, Haskell is what I do to relax and when I don't want to think too hard about programming (and maintainance!)
Anyhow, I added a 'screenshot' of a zettel to github readme, which probably shows most things it can do when compared to the program help text already on github.
Many thanks for your vid. It is very helpful.
I see you have vimwiki, vim-zettelkasten and notational fzf configured. These are basically the plugins I use myself.
Now, I have a rather impertinent question: Is there any way I could get my hands on your script?
I don't have much experience with shell scripts, especially those pertaining to vim, thus the task of writing one on my own from scratch seems rather daunting.
Cheers
agata
Actually, I am not using vim-zettelkasten, I just tried it once but figured I will be better off using my own scripts. It's still in my vimrc for some reason though.
I sent you a PM with my code.
Maybe my vim-workflow will be of some use to others (I also love talking about nerdy stuff like vim)
Setup:
My intention in using vim as my Zettelkasten was primarily vims modal editing, its speed (although The Archive does not lack speed at all) and my dislike for mice.
Additionally I did not want to become dependent on Vimwiki. So I went for a Search Plugin that does everything (and much more) that I need.
Telescope Search is at the heart of my Vim Zettelkasten. I use it to find Zettel, find words/phrases in Zettel and follow [[UUID]] Links thorough my Zettelkasten. Crucially it shows me a preview of the notes.
Telescope can handle all of these tasks with ease. So essentially I "only" use telescope as my main tool for my Zettelkasten in Vim. I do use more plugins but they are not essential to my Zettelkasten workflow.
Here are some screenshots:
I mapped
leader
ff to find files.I mapped
leader
fg to Live Grep wordsI mapped
leader
fb to find open buffersI mapped
leader
w to find word under cursor (I use it to navigate through my Zettelkastens UUIDsOnly proper Markdown Syntax highlighting is missing. I do miss the [[UID]] highlighting. If someone knows how to do this, I would love some help.
How do you map the leader keys/key sequences? (Could you share that code?)
Also, intense indentations in the lists about "Geistlichen am Münster"!!
Author at Zettelkasten.de • https://christiantietze.de/
haha true. I played around with auto-formatting... as you can tell I was not successful
You can check my dotfiles here: https://github.com/blay/dotfiles/blob/master/vimrc
Pretty simple ways of navigating files, search inside files, work with markdown and bibtex, and handle [[links]] in different ways. Some relies on external scripts you can also find in my github for example for finding mutual links and references between different files.
I find that the benefits of automating everything and saving a few commands is often not worth the cost of loosing the flexibility of a simple way of doing new combinations between commands. Especially for commands you don't use constantly. For example when I insert a new link, I search for a file and open it, copy its path, switch to previous buffer and paste surrounded by [[]]. A few steps, but allows me to find a filename in any kind of way and then paste it as a zettel link. Small pieces, loosely joined as they say...
I also use git log a lot as a way of tracking my writing, completed todos and reflect of progress.
@ctietze
Would it be possible to implement a Vim Mode in The Archive? Obsidian implemented a vim mode.
I am just curious if it would be possible to implement that?
A confession:
After using The Archive for a year and a custom vim implementation the last 2 months, I switched back to The Archive.
Although I prefer editing text in Vim I missed The Archives simplicity. If I am honest I was spending more time perfecting my vim setup than actually creating valuable zettel. After switching back to The Archive I immediately saw an increase in valuable output, which is ultimately my highest goal.
As a compromise I am using Vim Mode Plus with Karabiner Elements. It attempts to be a system-wide Vim Emulation. Its not necessarily intuitive but in a basic sense it works quite well.
I hope I remember this lesson when I am getting the Vim-fever again... And it will come again, for that I am certain.
(Read: @ctietze did a fantastic job in coding this beautiful piece of software)
Thanks
(I personally dream about input modes, too, but that's a hobby project for some other year.)
Author at Zettelkasten.de • https://christiantietze.de/
Hello Zettlers,
Last 3 months I was using obsidian for my note taking, and was solely using it for the beautiful graph view (which by the way doesn't help much for creativity, but it's very pleasant for the eyes, and is a clever way to sell the Zettelkasten concept to family/friends).
Last week I had a mighty scare with obsidian, when I got a huge structure note about sleep deleted, because of small storage left.
I did manage to get back my note, but it was scary and urged me to change something.
I started an internship a month ago where I have full liberty in programming stuff, so I took this opportunity to exit VSCode in order to Vim as my primary IDE.
The first days were really hard, but today, I can say that I'm better in speed than where I was with VSCode.
So I use now Vim to write my Zettels too.
These are the mappings I use for my note taking and browsing:
It's very fast, and the fuzzy search is working well.
I managed to create quality notes using this method so far.
Oh and by the way, sorry for reviving this old post, but if it can help some people as I would have wanted some weeks ago, I think it's a good deal.
Stay safe,
Daniel.
Hello everyone,
I am quite new to Zettelkasten myself, but in order to make it easier to get in it, I created a small telescope extension that facilitates greatly the manipulation of my Zettels with neovim. The extension does not require anything particular besides telescope (no vimwiki or vim-zettel).
You can find it here: telescope-zettel.nvim
Let me know if you would be interested in more features. I am new to ZK and this is plenty enough for me, but it could surely be improved.