13 votes

Kakoune, a punk rock text editor

8 comments

  1. [2]
    helloworld
    Link
    I've been using Kakoune as the fix-it-quick terminal editor for past few months. As someone who learns things slowly, I very much agree about the DIY aspect, as the ecosystem is pretty bare as it...

    I've been using Kakoune as the fix-it-quick terminal editor for past few months. As someone who learns things slowly, I very much agree about the DIY aspect, as the ecosystem is pretty bare as it is. But that is part of it's charm, there are very few distractions, and what little modifications I do need I can add quickly via strung together shell scripts. It's not pretty, but in my experience almost nothing that happens to be customized and personalized is.

    5 votes
    1. daturkel
      Link Parent
      As a (neo)vim user, I've been curious about Kakoune for a while. I hope it sticks around and continues to mature—competition only makes everyone better. For now, I'll stick with Vim as I've...

      As a (neo)vim user, I've been curious about Kakoune for a while. I hope it sticks around and continues to mature—competition only makes everyone better. For now, I'll stick with Vim as I've invested a lot of time into configuring it in a way that's productive for me.

      3 votes
  2. [6]
    tesseractcat
    Link
    Heres an essay speculating that kakoune editing model wouldn't be (or isn't) much of an improvement from vim: https://github.com/noctuid/dotfiles/blob/master/emacs/editing.org#why-not-kakoune. And...

    Heres an essay speculating that kakoune editing model wouldn't be (or isn't) much of an improvement from vim: https://github.com/noctuid/dotfiles/blob/master/emacs/editing.org#why-not-kakoune. And I find myself agreeing with a lot of it. One thing that Kakoune does amazingly well, however, is multi cursor editing, but I think that this is done well with a vim editing model with the vis editor. I really really hope that the multi cursor editing of vis gets integrated into neovim at some point, it's just so good.

    4 votes
    1. [5]
      Pistos
      Link Parent
      Can you give me a sales pitch for multi-cursor "anything" in an editor? I've seen it in some editors, but it has never struck me as something tremendously useful that other editor features...

      Can you give me a sales pitch for multi-cursor "anything" in an editor? I've seen it in some editors, but it has never struck me as something tremendously useful that other editor features couldn't provide. I don't see the appeal. Not trying to be deliberately negative; just want to get an understanding of the other side of the coin.

      2 votes
      1. fleg
        Link Parent
        For me, multiple cursors (I use them in Sublime) are helping with editing similar pieces of code. For example, when I copy and paste a list of enum elements I am able to adjust them quickly all at...

        For me, multiple cursors (I use them in Sublime) are helping with editing similar pieces of code. For example, when I copy and paste a list of enum elements I am able to adjust them quickly all at once. And, what I really like is that I see instantly what I'm going to get, and it feels really natural.

        In short, it's something that it's really easy to learn and grasp (press ctrl and click and you'll get another cursor that will behave in the same way as your first one does) but gives you quite a much power when you are doing repetitive editing actions. Of course everything is achievable with other features, but usually it's not as intuitive.

        4 votes
      2. tesseractcat
        Link Parent
        There are a lot of times while programming where I want to edit 5-10 structurally similar, but not exactly duplicate pieces of text. Multi cursor allows me to easily make structural modifications....

        There are a lot of times while programming where I want to edit 5-10 structurally similar, but not exactly duplicate pieces of text. Multi cursor allows me to easily make structural modifications. I'm not sure whether or not multi cursor would work as well without modal navigation, because, for example, while using multiple cursor in vim (with this plugin), I can v-select a piece of text, then press <C-n> a few times to select the next few occurences of that, then do f) to move each selection boundary to the next ), and then change things, then press b to move back one word, change something, disable select mode and press ~ to change the case of the character at each cursor, etc.

        Multi cursor editing is essentially a great way to avoid needing to think up complicated regex on the fly and still avoid unnecessary repetition. The thing I love about the vis editor is it combines multi cursor editing with plan-9 structural regex, so I can define the general outline of kind of the thing I want to edit with regex, and then make the individual changes with multi-cursor editing.

        When I find myself needing to make 50+ changes to a file, I think vim macros or more specialized regex is usually worth the time investment (although multiple cursors will often work just as well).

        3 votes
      3. bln
        Link Parent
        Not exactly code, but I've used it to edit some csv files. Say the first column was an hour and I needed to add the date. With a keyboard shortcut you can add a cursor on every line and type the...

        Not exactly code, but I've used it to edit some csv files. Say the first column was an hour and I needed to add the date. With a keyboard shortcut you can add a cursor on every line and type the date you want in all rows at once.

        1 vote
      4. Diff
        Link Parent
        As an example, yesterday I was defining a list of constants of ANSI-ish colors. Wrote out the main colors, copy and pasted the list, then used multiple cursors to add "Light" to the beginning of...

        As an example, yesterday I was defining a list of constants of ANSI-ish colors. Wrote out the main colors, copy and pasted the list, then used multiple cursors to add "Light" to the beginning of each line in the copy, quickly giving me normal and light variants of all the colors. Or if I want to type the same thing in two places but want to look cooler doing it than copy and pasting it, I'll spin up a second cursor and just type it out at both places.

        1 vote