My Kakoune Editor Configuration

A friendly explanation of how Kakoune is configured.

Erik Engheim

--

Most likely, you are reading this because you already have some idea of what the Kakoune editor is. If you don’t, you can think of Kakoune as Vim for dummies. Yes, I include myself in that category. I have what amounts to a goldfish memory when it comes to remembering tons of commands in advance coding editors.

Read more: Kakoune, the Text Editor I Didn’t Know I Needed.

I quite like the whole concept of Vim, but I can never quite get used to it. Instead I prefer to use more GUI-oriented editors such as TextMate and VSCode. However, there are many cases where a more terminal oriented editor such as Vim and Emacs is preferable. Vim has been my go-to editor in these cases. But if you, like me, are more of a casual user of Vim, I think you will find Kakoune a superior alternative. It operates in very similar fashion to Vim. But it is like a modern more user-friendly version of Vim.

Here is a quick example to see the benefits. With Vim, you would delete three words with the d3w command. The logic of Vim is: First you type what you want to do, which is d for delete. Next you type the part of the text to apply this to. In this case, it is 3w, meaning three words from the word you are currently at.

The problem with this approach is that it is never readily apparent what you are going to perform your operation on.

Kakoune makes some minor changes to the Vim formula to make this more user friend. With Kakoune, the command is 3Wd. When you first just type 3W you will see the following in your editor:

In other words, you actually see what part of the text will get affected by the command that you are about to press next. Please note that W means Shift-W. In Kakoune, like in a regular GUI editor, you typically use Shift key to expand a selection. Thus in Kakoune 3w will jump to the third word and highlight it, while 3W will highlight all three words. Alternatively you can can jump three words with www or highlight three words with WWW.

--

--

Erik Engheim

Geek dad, living in Oslo, Norway with passion for UX, Julia programming, science, teaching, reading and writing.