cross-posted from: https://lemmy.ml/post/15059157

cross-posted from: https://lemmy.ml/post/15059150

Hey friends,

I tried Kakoune for the first time recently—I definitely feel like it gets keybindings right. So I just wrapped up configuring Helix to (as far as I can tell) use those bindings (basically, it totally cuts out select mode and makes things much faster). Thought I’d share for anyone else interested.

[keys.normal]
H = "extend_char_left"
J = "extend_line_down"
K = "extend_line_up"
L = "extend_char_right"

W = "extend_next_word_start"
E = "extend_next_word_end"
B = "extend_prev_word_start"

A-j = "join_selections"

A-n = "search_prev"
N = "extend_search_next"
A-N = "extend_search_prev"

[keys.normal.g]
e = ["goto_last_line", "goto_line_end"]
G = ["select_mode", "goto_file_start", "normal_mode"]
[keys.normal.G]
H = "extend_to_line_start"
L = "extend_to_line_end"
E = ["select_mode", "goto_last_line", "goto_line_end", "normal_mode"]
[keys.normal.v]
t = "align_view_top"
b = "align_view_bottom"
v = "align_view_center"

Happy editing!

  • LalSalaamComrade@lemmy.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    5 months ago

    I wish Kakoune was somewhat popular. I would love to start working on a similar project using Guile integration, but I really suck at reading source code.

    • Ramin Honary@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 months ago

      Steps are being made toward Guile Emacs integration. The work is mostly being done by Robin Templeton, who (last I heard) works at the Spritely Institute. And as I understand, there are other people pushing on the Guile in Emacs front as well, so you may not have to wait long.

      Have you considered trying to setup Kakoune bindings in Emacs? For example like this: https://github.com/jmorag/kakoune.el

      • LalSalaamComrade@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        5 months ago

        Thank you for sharing this. I’ve never tried using Emacs before - since I’m on a very low-end laptop, I am curious if it would hurt the performance on my device? It’s a i3-6006U with just 4.0GiB of RAM. Also, Guile Emacs and Guilemacs are two different projects, right? Because I also happen to come across this, and I’ve been interested in this project as well.

    • gramgan@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      5 months ago

      The best way to understand really is to install both and try yourself, but basically I would say Kakoune is more “radical” than Helix, which feels more like Vim. Both move the selection in normal mode, but Helix has you extend it using what’s basically visual mode, whereas Kakoune cuts out visual mode altogether and has you hold Shift. As you can see in the config, reconfiguring what Shift does causes issues with normal Vim bindings (like joining selections with J), so Kakoune solves this with Alt.

      After using it for a few days, it made a lot of sense to my brain—I would say, in general, Kakoune feels enormously well thought-out and carefully considered in every element of its design.

      • dino@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 months ago

        Mhm interesting, compared to helix it also seems to be available in the debian repositories. But what I don’t like is the similar approach as of vim/nvim where you have to configure everything yourself, instead of delivering a wholesome experience with sane defaults like helix editor does. Thanks anyway.