Kakoune: A Better Code Editor Heavily Inspired by Vim

Kakoune is a free, open source, powerful, interactive, fast, scriptable and very customizable code editor with a client/server architecture. It runs on Unix-like systems such as Linux, FreeBSD, MacOS, and Cygwin. It is a Vi/Vim like modal editor which aims to improve Vi’s underlying editing model for more interactivity.

Read Also: 18 Best IDEs for Programmers and Developers

It comes with numerous text editing/writing tools such as contextual help, syntax highlighting, auto-completion while typing, and supports many different programming languages. It also implements multiple selections as an essential procedure for interacting with your text.

In addition, Kakoune’s client/server architecture allows for multiple clients to connect to the same editing session.

Kakoune Screenshots

Kokoune Code Editor

Kokoune Code Editor

Kokoune Code Editor Features

Kokoune Code Editor Features

Kakoune Features:

  • It is interactive, predictible, and fast.
  • Supports multiple selections.
  • Supports syntax highlighting.
  • It operates in two modes: normal and insertion.
  • Uses less keystrokes making it fast.
  • Supports auto-information display.
  • Also supports extensive auto-completion.
  • Offers multiple text editing tools.
  • It supports working with external programs.
  • Supports advanced text manipulation primitives.
  • Uses powerful handling primitives such as regex matches, filtering, splitting, aligning, text objects and more.

Requirements:

  • GCC >= 5 or clang >= 3.9 (with associated C++ standard library (libstdc++ or libc++)
  • libncursesw >= 5.3
  • asciidoc for creating man pages

How to Install Kakoune Code Editor in Linux

On major Linux distributions such as CentOS/RHEL and Debian/Ubuntu, you need to build and install it from sources. Before that first you need to install development tools and other dependencies on your system and then clone the sources code, build and install it with the following commands.

Install Kakoune Code Editor in CentOS/RHEL

# yum group install 'Development Tools' ncurses-devel asciidoc
# cd Downloads/
# git clone http://github.com/mawww/kakoune.git
# cd kakoune/src
# make
# make man
# make install

Install Kakoune Code Editor in Debian/Ubuntu

$sudo apt update && sudo apt install build-essential libncurses5-dev libncursesw5-dev asciidoc
$ cd Downloads/
$ git clone http://github.com/mawww/kakoune.git
$ cd kakoune/src
$ make
$ make man
$ sudo make install

On Fedora, you can install it from the copr repository using following command.

# dnf copr enable jkonecny/kakoune
# dnf install kakoune

On openSUSE, you can install it from the default repository by running the following command. Make sure to specify the repository for your openSUSE version (Tumbleweed in this example).

$ sudo zypper addrepo http://download.opensuse.org/repositories/editors/openSUSE_Factory/editors.repo
$ sudo zypper refresh
$ sudo zypper install kakoune

On Arch Linux, install it from the AUR by running the following command.

# yaourt -Sy kakoune-git

How to Use Kakoune Code Editor in Linux

Once you have installed kakoune, simply launch it by running the following command with script filename (example getpubip.sh) that you want to code.

$ kak getpubip.sh 
Starting Kakoune Code Editor

Starting Kakoune Code Editor

Because of kakoune’s client/server architecture, the above command will open a new session, with a client on the local terminal.

To enter in insert mode, press i. After making changes to your source code, use :w to write changes. And to get back to the normal mode, press <Esc>, to quit, use :q. If you want to quit without writing changes, use :q!. As you can see, most of the keys are similar to those in Vi/Vim editor.

Kakoune Normal Mode

Kakoune Normal Mode

You can get a list of all accepted command line options by typing.

$ kak -help

For a comprehensive documentation including keystrokes to use in the insertion mode, check out the Kakoune Github repository: https://github.com/mawww/kakoune

Kakoune is a Vi/Vim like modal editor; built to enhance Vi’s editing model making writing/editing code both faster, and more fun. Share your thoughts about it via the feedback form below.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

12 Responses

  1. frttls says:

    Hi,

    For Debian “pkg-config” error: make -> …/kakoune/src/ –&gt; solution “apt install pkg-config” an then “make” is running.
    For Debian “xsltproc” error: make man -> …/kakoune/src/ –&gt; solution “apt install xsltproc” an then “make man” is running.

  2. Julian says:

    Why not Atom? You just install it and start coding. No learning, completely free, open source, works on all operating systems, big community… So simple.

  3. Scotsgeek says:

    Gee, it would appear they are trying to emulate emacs!

    I’ll stick with emacs!

  4. Delapouite says:

    Bob, Stony: you can have a pretty good overview of the pros here : http://kakoune.org/why-kakoune/why-kakoune.html

  5. Bob says:

    Do you know how many years I spent learning vim? Unless it’s a drop in replacement, I don’t plan on investing that much time on a text editor ever again!

  6. Stony says:

    It would help if you included reasons why to switch. As someone who already has a customized Vim, I fail to see any arguments as to why I should switch. Show us why it’s better.

    • Aaron Kili says:

      @Stony

      I suppose the reason was summarized in the conclusion, “built to enhance Vi’s editing model making writing/editing code both faster, and more fun.” If this is not enough to convince you, please try it out and you could even find more reasons. Many thanks for sharing your concern with us.

Leave a Reply to Julian Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.