As developers, the context of the problem we are currently trying to solve often lives in several different files. And if you’re anything like me, keeping track of all those files can be a struggle. Over the years I have witnessed many solutions to this problem. Some use tabs. Some use new windows. I’ve even seen people leverage virtual desktops for this, which is a feature all modern operating systems support and I thought was quite clever. I would like to add my own potential solution to the mix, using what I call a “filelist”.

What is a filelist?

A filelist is a regular file that may contain a newline-separated list of other files. The special ingredient that makes this work (as opposed to being a tedious test of patience) is the plugin I built, filelist.kak, for the editor I use, kakoune.

This plugin adds the following features:

  • syntax highlighting, including comments
  • a listener on <ret>1 that navigates to the file on the current line
  • commands to navigate to the next/previous file (ignoring comments/whitespace)
  • command to navigate to the filelist
  • command to add current file to filelist
  • command to populate the filelist from a directory/pattern
  • some other fancy stuff unrelated to this post

This means I can at any time press - to open my filelist. I can organize paths by topic, and add comments to explain what each group is or add notes about a specific file. I still mostly find myself opening files with a fuzzy finder, but have found having a filelist has helped make up for my poor memory.


  1. this is short for the Enter key ↩︎