What does HackerNews think of kakoune?

mawww's experiment for a better code editor

Language: C++

#3 in C++
#2 in Vim
#3 in Vim
You might like kakoune (https://github.com/mawww/kakoune), which does exactly that: first you select the range (which can even be disjoint, e.g. all words matching a regex), then you operate on it. By default, the selected range is the character under cursor, and multiple cursors work out of the box.

It's also generally lean and follows the Unix philosophy, e.g. by using shell script, pipes, and built-in Unix utilities to do complex operations, rather than inventing a new language (vimscript) for it.

(Not affiliated with the creator, but kakoune has been my daily driver for years now.)

I think the text editor, [Kakoune](https://github.com/mawww/kakoune), was written as an experiment in modern C++ language features. Its documentation says it requires a C++20 compiler, though I don't imagine it was originally for that version, since it was started before 2020.
No hand waving. Structural regular expressions are starting to get popular just in the last couple of years. They're getting integrated in text editors and other tools. Take a look at this talk for concrete examples from the Vis text editor: https://www.youtube.com/watch?v=y41MyOrPt8Q. Also Kakoune text editor defaults to structural regular expressions in the search https://github.com/mawww/kakoune.
I really like the way kakoune (https://github.com/mawww/kakoune) handles it, the editor doesn't have any scripting as such, it has an "API" in the form of pipes and environment variables that can be used by shell scripts or tools written in any language. Unix is the IDE.

I just could never get my head around the key bindings with kak.

Thanks. I did look for a FAQ but could find it. It doesn’t seem to be linked from their read me documentation https://github.com/mawww/kakoune
Something like Amp [1] or Kakoune [2] ? As with vim they are modal, but one needs to press less keystrokes and they are more intuitive as they use object_letter -> action_letter, not action_letter -> object_letter model.

[1] - https://amp.rs/

[2] - https://github.com/mawww/kakoune

Check out Kakoune[1] for a different take on an editor’s scripting language. It offloads as much as possible to existing Unix tools such as bash, sort, fmt, etc. It uses a clever system of string substitutions that’s a bit unintuitive at first, but not too difficult to grasp quickly. I spent two weeks trying to fix a bug in a Vim plugin that ended up being a 3 line change. After that I felt like I barely understood just a small section of vimscript.

I ended up switching to Kakoune after trying it for a bit because I realized that in the two weeks of me exploring it I had entirely understood it’s “scripting language”, or at the very least understood how to use the onboard docs to write any plugin I wanted to.

[1]: https://github.com/mawww/kakoune

If I didn't rely on neovim plugins so much, I would use kakoune. Native modal multi cursors and noun verb as apposed to vi's verb noun order have to be experienced to be believed. https://github.com/mawww/kakoune
Relatedly, there's a vim-like editor that is all about moving from verb-noun to noun-verb.


neofetch [https://github.com/dylanaraps/neofetch] for showing a friendly system information

gst123 [http://space.twc.de/~stefan/gst123.php] a music player

prettyping [https://github.com/denilsonsa/prettyping] a prettier ping

kakoune [https://github.com/mawww/kakoune] a nice (relatively friendly) modal text editor

You might like kakoune, a vim-like editor which focuses on interactivity: https://github.com/mawww/kakoune It flips around a few of vim's operations (like for example, to delete a word, you do 'wd' and not 'dw'). This allows it to highlight the text before performing an operation, which makes what you're doing much clearer.
Not for this editor, but here's a really impressive introduction to Kakoune, another small but excellent app

https://github.com/mawww/kakoune https://vimeo.com/82711574

It's funny how you see these articles about fancy text editor buffer representation (gap buffer, ropes) but meanwhile, the editor with the best feature/performance ratio (including multiple cursors) I've found[1] "simply" represents a buffer as a vector of strings.

[1]: https://github.com/mawww/kakoune

Kakoune[1] has been posted recently here on HN to great reception. As a C++ developer, I think it has a very high quality codebase, especially considering how non-trivial it is. As a user, it's been my main text editor for over a year. It also has a vibrant community, jump in on IRC if you have questions or ideas.

[1] https://github.com/mawww/kakoune

It's pretty hard to find a link[0] to actually getting kakoune on the home page. Usually that sort of link at the bottom is an email URI and I try to avoid clicking on those.

Based on the linked screenshot[1], perhaps the editor should be named "Clippy's Revenge"

[0] https://github.com/mawww/kakoune

[1] http://kakoune.org/img/screenshots/screenshot-tmux.gif

The code statistics on github[1] show almost all C++, while vim is written in C. According to the author the project began as a reimplementation or merely a rewrite of vim then turned into a more ambitious reimagining of how to design a modal editor.

[1] https://github.com/mawww/kakoune

They are just command that you could execute manually (using ':' like in vim). The difference is that all the commands in this file are executed at startup.

As I said, all the heavy lifting is done in scopes like %sh{ ... }. This way you can actually use any language you want, and it's only the piping you have to do through kakoune commands.

Most common languages (like go) already have plugins to do some basic tasks like formatting.

If you're interested in the editor, I would rather recommend reading the readme of the project[1]. There is a lot to read, and you can start making plugins once you understand it.

[1] https://github.com/mawww/kakoune

From the github repository: https://github.com/mawww/kakoune reply

    Vim inspired — Faster as in less keystrokes — Multiple selections — Orthogonal design
You can find the editor source, and installation instructions on github: https://github.com/mawww/kakoune
I was sort of in your situation a while ago and wanted to learn vim, but was a bit put off by all the legacy that it carries (also spoiled by sublime's multiple cursors).

I then discovered kakoune[1] and liked its design. I started getting familiar with it and using it more and more, and I think its core is much more solid than vim/emacs. It definitely doesn't have the same community support and plugins but it's already quite feature rich.

[1] https://github.com/mawww/kakoune

I've found that reading the source code (or at least the general structure) of kakoune[1] really helped me understand editors. I think it's a very high quality c++ codebase for a relatively complex editor.

[1] https://github.com/mawww/kakoune

Personally, I find vim's modal editing to be very efficient. When starting from a clean slate, it doesn't really matter much -- but when changing/editing existing text/code, I find it feels much more natural. It also works well without using the mouse, which is important to me because of carpal tunnel syndrome (and also helps when working without a proper mouse, such as on laptops).

I've only toyed with emacs, but based on that, I don't think emacs' idea of keyboard "chords" is as good a fit as vi(m). With standard keybindings, it also puts a strain on my wrists.

Modal editing and the "edit language"[1] (verbs, nouns, modifiers (and motions), like dw=delete word, dd/dl=delete line, d$=delete from cursor to end-of-line, dG (delete to endo-of-file, where gg/G is motion for moving to top/bottom of file respectively), ciw()P=change inner word (cut word under cursor to buffer), add "()", escape out of insert mode, paste word between "()"). These look cryptic, but quickly starts to feel quite natural and intuitive.

My impression is that Emacs' Evil-mode has evolved quite a lot lately, and allows one to combine the best of both: a much better programming language (scheme dialect) for customization, with modal editing and vi(m) key bindings. But I've yet to play with it.

If you don't mind using the mouse, you might also want to look at ACME[2] - it's a bit more exotic, and unfortunately hasn't gotten as much support as VIM/Emacs.

The creator of Vim, Mjolnar, has a great video on "7 Habits For Effective Text Editing 2.0":


I think the idea is very powerful: aim for incremental improvement in your workflow. You don't have to use vim to do that, but you certainly can use vim for that. Another editor that might be worth a look if you're not already familiar with vim, is: https://github.com/mawww/kakoune

The main argument for Neovim/vim/Emacs over other "smaller" editors would be the plugin eco-system. I have a theory though, that beginners tend to start out with a lot of plugins, and then gradually trim down, as they realize the power that lies within the editor itself.

Still, for vim, you will probably want a plugin manager (well, maybe not now with vim 8 supporting that out of the box :-), and depending on what you're writing, some integration with a tag tools, like cscope, perhaps a search-tool like Ag/The silver searcher: https://github.com/rking/ag.vim#readme

As for plugin manager, I'm personally in the process of moving - I'd suggest looking at Vundle and/or vim-plug.

Finally, you can generally count on any unix-like system to have some form of vi(m) installed -- I'm not sure I really see that as such an important point, but does make it easier to edit stuff on a server with only ssh open to the world. But that stuff you're editing should probably be in a VCS, and use some kind of automated push to land on the server anyway! :-)

[1] http://yanpritzker.com/2011/12/16/learn-to-speak-vim-verbs-n...

"A Tour of the Acme Editor", by Russ Cox [2] https://www.youtube.com/watch?v=dP1xVpMPn8M

Do you use evil-mode? I went the opposite direction (Emacs -> vim -> now kak[1]), and I find non-modal editing quite frustrating now.

1: https://github.com/mawww/kakoune

An another alternative to the vim plugins, here's a vim-like text editor that concentrates on selections and multiple cursors: https://github.com/mawww/kakoune
Try kakoune[0]. As far as I can see, it's stable today. Just try not to think about how the name sounds shitty.

[0] https://github.com/mawww/kakoune/

well, if you want a re-think/re-factor of vim, you should definitely have a look at kak (https://github.com/mawww/kakoune).

It's basically trying to improve over vim, still using command/insertion modes, inverting the commands (by using movement/action instead of action/movement)… It's pretty configurable and the codebase is new.

definitely worth a try!