Kakoune

Rating: 
5
Your rating: None Average: 5 (4 votes)

Kakoune is a code editor that implements Vi’s "keystrokes as a text editing language" model. As it’s also a modal editor, it is somewhat similar to the Vim editor (after which Kakoune was originally inspired). If modal text editors are not your thing, go check micro.

Since Kakoune uses ncurses, I recommend using Havoc terminal emulator for optimal support, but if you have no hardware keyboard, then Literm and Toeterm should mostly work (redraw glitches may occasionally occur though).

Kakoune can operate in two modes, normal and insertion. In insertion mode, keys are directly inserted into the current buffer. In normal mode, keys are used to manipulate the current selection and to enter insertion mode.

Kakoune has a strong focus on interactivity, most commands provide immediate and incremental results, while still being competitive (as in keystroke count) with Vim.

Kakoune works on selections, which are oriented, inclusive range of characters, selections have an anchor and a cursor character. Most commands move both of them, except when extending selection where the anchor character stays fixed and the cursor one moves around.

See the design document for more information on Kakoune philosophy and design: https://github.com/mawww/kakoune/blob/master/doc/design.asciidoc/.

Demo video at https://vimeo.com/82711574

# Usage

$ kak /path/to/file

 

Type ":" while in normal mode to see available commands, e.g., ":doc options". Commands can be applied to the current buffer, or globally. For instance, to show line numbers in all buffers, type ":add-highlighter global/ number-lines".

While not as steep as Vim's learning curve (thanks to command tooltips, among other things), learning Kakoune is not exactly a walk in the park if you have not used a modal editor before. Go check the wiki, for instance to understand how to configure options by adding commands to ~/.config/kak/kakrc and run them automatically, or use plugins (installing them is very easy with the plugin manager): https://github.com/mawww/kakoune/wiki/.

Must have plugins: plug.kak (plugin manager), kakboard (share clipboard with system), but there are many others. If you want to use the spellchecker with ":spell en", you'll need to install the aspell-en package from the Jolla official repository.

# Main features

- Multiple selections

  • Multiple selections are the central way of interacting in Kakoune, with powerful handling primitives (regex matches, filtering, splitting, aligning, text objects etc).

- Text editing tools

  • Kakoune implements several tools to help editing/writing text: contextual help, as-you-type completion, syntax highlighting for several programming languages…

- Advanced text manipulation primitives

  • Text can be selected and modified at will in multiple ways, thanks to several primitives: selection rotation, case manipulation, indentation leveling…

- Customization

  • Users can extend the features of Kakoune or customize them to their liking with macros or hooks.

- Client/Server architecture

  • With Kakoune, you can collaboratively edit the same file: all new windows created by the editor are clients, and can simultaneously modify the content of a file. As such, windows are fully under the control of your X11 window manager or can be managed in a single terminal through Kakoune's tmux support.

# Detailed features

- Multiple selections as a central way of interacting

- Powerful selection manipulation primitives

  • Select all regex matches in current selections
  • Keep selections containing/not containing a match for a given regex
  • Split current selections with a regex
  • Text objects (paragraph, sentence, nestable blocks)

- Powerful text manipulation primitives

  • Align selections
  • Rotate selection contents
  • Case manipulation
  • Indentation
  • Piping each selection to external filter

- Client-Server architecture

  • Multiple clients on the same editing session
  • Use tmux or your X11 window manager to manage windows

- Simple interaction with external programs

- Automatic contextual help

- Automatic as you type completion

- Macros

- Hooks

- Syntax Highlighting

  • Supports multiple languages in the same buffer
  • Highlight a buffer differently in different windows

Go see the github page (https://github.com/mawww/kakoune/) or the website (https://kakoune.org/) to check the full list of features and advanced options.
 
# Disclaimer
I am not the developer of Kakoune, I just packaged it for SFOS. Kakoune is being actively developed by Maxime Coste and other contributors, but that does not include the SFOS package, which may or may not be updated in the future. There is a #Kakoune IRC channel on Freenode.

 

Screenshots: 
Application versions: 
AttachmentSizeDate
File kakoune-2020.01.16master8b36969-1.armv7hl.rpm11.16 MB18/06/2020 - 01:56
File kakoune-2020.01.16master8b36969-2.armv7hl.rpm814.95 KB18/06/2020 - 03:20
Changelog: 

* Wed Jun 18 2020 Kabouik <matf[redactedforbots]disr.it> 2020.01.16+mster8b36969 Rel. 2
- Stripped version to reduce size from 50 to 1.7 MB (!).

* Tue Jun 17 2020 Kabouik <matf[redactedforbots]disr.it> 2020.01.16+mster8b36969
- First SFOS package based on the master branch, commit 8b36969.
 

Comments

freerunner's picture

Nice!! My favourite editor finally on SFOS! Thank you so much!