I’m moving to one Kakoune session for all projects, rooted in ~/src, one directory above all of my projects except one. (The exception is a submodule of another project and could be symlinked, so we can safely ignore it.)

This solves two problems for me:

  1. I can switch projects with zero effort, and can work accross projects when I need to. This lowers the barrier to breaking out Open Source libraries and tools to share.

  2. I can communicate with the Kakoune session from outside Kakoune without needing to figure out which session. This comes up for me in how I use the Plan 9 plumber to open files, and how I use 9p to query Kakoune.

Before, I was using one tmux tab per project, which was also one Kakoune session. This resulted in a lot of idle tabs that I’d never close. Now I only have one tab most of the time, occasionally two, but the second is short-lived. This is very nice.

Philosophically, I’m treating the mutable, global working directory as a kludge to avoid typing extra letters in filenames — which it is very good at, but it also makes a lot of functionality unavailable at one time based on a hidden variable.

I still change directories in shells, mind you — it seems like current directories still work well there.

Problems

While this has solved problems, it has also created some:

  1. It requires some effort to get some linters who want to be run inside a project directory working.

  2. My rep tool can’t find the project socket.

  3. I have to remember to specify a subdirectory when running :grep.

  4. My :find command is now too slow.

I think all of these, except perhaps 3, are easily solvable.

On 4, my Macbook uses mdfind, a realtime file indexer provided by Apple this works super well. No such thing exists on Linux, as far as I can tell, so I might end up building one.