Kakoune: A modal editor that hits above its weight class

Time to wrap your knuckles and grab an energy drink. A new modal editor called Kakoune is here and it packs quite a punch. We put Kakoune through its paces to see what kind of features it has to offer developers.

There are a lot of IDEs, text editors, code editors and the like out there on the market. Today, we’re looking at Kakoune, a modal editor based on Vi that punches above its weight class.

Kakoune (pronounced “KAK-oon”) is a New Caledonian word based on French meaning a hard blow or heavy punch. Modal editors are a little different than the ordinary text editor, since they allow developers to switch between different modes. Depending on the modes, different keys have different effects. While many text editors are biased towards insertion, modal editors allow for things like moving the cursor to the next work, yank, paste, undo, and more.

Kakoune

Kakoune was designed to improve upon Vi’s lack of interactivity. Much like Japanese, Kakoune runs on a Object – Verb structure. This was developed for instantaneous feedback. As soon as the verb is typed, it is possible to see if the changes have any errors or not.

It’s highly extensible, with a number of hooks or macros available to change as desired.

This modal editor also supports multiple selections as one of the main ways to edit the text. No need for a global “replace”. Multiple selections provide developers with a very powerful way to express structural selection. They can subselect matches inside the current selections, keep selections containing/not containing a match, split selections on a regex, swap selections contents, and more.

There are a lot of options for editing and writing text. Kakoune implements contextual help, as-you-type completion, and syntax highlighting for several programming languages. Plus, the advanced text manipulation primitives means that text can be selected and modified at will in multiple ways, with rotation, case manipulation, indentation leveling.

In particular, the completion support means that Kakoune is a lot easier to code with. When a command is written in a prompt, a menu pops up and provides the complete list of available completions that could work within these specific parameters. Additionally, it embraces fuzzy matching for its completion support, which kicks in both during insert mode, and prompt mode.

Kakoune supports any number of languages, include C/C++, Java, Python, Ruby, TypeScript, and more.

Getting Kakoune

Kakoune is freely available on GitHub. It can be built on Linux, MacOS, and Cygwin, however, there is no native Windows version planned. This modal editor is under active support; volunteers and bug reports are highly welcome.