Live data from Hacker News

Why Kakoune – The quest for a better code editor

kakoune.org

281–290 of 329 posts

Re: Why Kakoune – The quest for a better code editor

#281

If you are wondering why Kakoune and not Vim, the OP claims... (you find following passages later in his post and they don't reflect my opinion) > A design goal of Kakoune is to beat vim at its own game, while providing a cleaner editing model. > Kakoune manages to beat Vim at the keystroke count game in most cases, using much more idiomatic commands. > Kakoune provides an efficient code editing environment, both ver…

In this age we need to think about things like voice control and 3D manipulation of data-structures and a dynamic view of the code. We can truthfully keep designing 2D editors (and we will always most likely use them to some extent) but I believe it is more important to consider different UI paradigms altogether. For instance, what about editing a living code environment? Game development is very immersive: you can m…

https://github.com/Azeirah/A-new-wave-of-programming

Re: Why Kakoune – The quest for a better code editor

#282

Earlier quoted context omitted.

I don't use either editor, but just out of curiosity, what functionality is in Sublime that Vim is missing? Multiple cursors? Certain plugins?

Mutli cursor. There is plugins which try to emulate it, but it either didn't work or was lacking a lot functionnality. Other things bothered me, but the lack of good multi cursor implementation was a reason to stop using vim by itself. Just can't live without it now.

I never use multiple cursors, not sure what I'm missing.

Re: Why Kakoune – The quest for a better code editor

#283
post #149

One of the nice things about being an Emacs user (hang in there, I have a real point about Vim to make) is that the concepts (especially non-modal editing) and the keyboard shortcuts map well to newer IDEs. I switch between IntelliJ and Emacs all day, and all I had to do to become comfortable is choose the Emacs keyboard preset in the IntelliJ preferences. The same is true for Eclipse and Visual Studio. The Emacs par…

I've used the vi style of editing with all IDEs over the years.. eclipse, visual studio, sublime and now atom. Oh, I also used vi style editing with Emacs :p (vim-mode or something)

Re: Why Kakoune – The quest for a better code editor

#284
post #273

Earlier quoted context omitted.

Mutli cursor. There is plugins which try to emulate it, but it either didn't work or was lacking a lot functionnality. Other things bothered me, but the lack of good multi cursor implementation was a reason to stop using vim by itself. Just can't live without it now.

I have trouble conceiving of a use case where macros or regex-replacement cannot do what multiple cursors do. Do you have one in mind?

I don't think there is anything you can do with multiple cursors that you cannot do with macros or regex replacements. But I also think multiple cursors are worth having!

I'm an Emacs user and there is a good multiple-cursors package for Emacs which I also use, so I have access to all of macros, regex-replacement and multiple cursors. I find that I do use all of them, but in different situations. I think of multiple cursors as "lightweight, instant feedback" macros.

I often screw up macros because of little edge cases that don't occur in the location where I'm recording but do occur somewhere else I want to apply the macro. You don't notice the mistake until you run the macro at that other location! If you ran the macro many times, you might not even notice the mistake until much later. When I do notice a mistake, I undo and edit the macro so that it applies to the other location too and then rerun.

With multiple cursors, if I can see all of the cursors on the screen at once, I usually spot mistakes while I go along and fix them immediately. Macros are like the compile and run cycle, whereas multiple cursors are like using a REPL (even more like a Bret Victor style live environment). I always prefer REPLs for the same reason.

If I can't get all the cursors to fit on the screen at once, I typically use macros, but thinking much more carefully about the macros than I would with multiple cursors. If you almost never screw up macros multiple cursors might not benefit you. But then again they might, because they let you be sloppier and go faster.

Re: Why Kakoune – The quest for a better code editor

#285
post #10

This looks awesome (although I think the name could use a little work). It also brings up a question I have for HN: Every few years, I make an attempt to learn to use one of the classic editors like vim or emacs, and inevitably give up after the enormous productivity drop I suffer when writing code. I just can't seem to pick up the muscle memory required to become fast with these tools, and the overwhelming array of…

> And, I suppose, I have another another question: is it worth it?

As a relatively new vim user I would say it is definitely worth it. I started slowly adapting the navigation just for fun and upgraded vim as my main editor roughly a year ago.

The thing why I personally like vim is because I can optimize every movement, every text change and every action to maximum. If something is not intuitive or feels awkward, I am one step away from changing my vimrc [0] to fix it. As a result, you end up with a editor that never forces you to leave the home row and does exactly to 100% what you expect it to do. Every function outcome and every cursor position after a motion becomes predictable, and if you get better/faster on the way, vim becomes better/faster as well. I am discovering new things or different approaches to existing techniques every day and love every bit of it.

At my job, I spend the majority of my time thinking, browsing code, more thinking and a lot of reading. Once I know what I want to change, no matter where it is, I can jump with minimum keystrokes to the exact spot and do what I wanted to do.

If you want to learn vim, here is what I did: I installed Vintageous in SublimeText and only used hjkl for navigation while still using sublime functionality for everything else. Then step by step adapted motions, text objects and Ex. Once I felt comfortable enough, I gave real vim a try. On the way somewhere I also stole a entire vimrc from someone popular on github and started with that as my base.

The only problem in my opinion is that once you adapted to using vim, it is hard to go to any other editor that does not have vim keybindings/support/motions.

Emacs I think is worth it as well. Almost all terminals and editors come with built-in emacs keybindings for basic navigation and actions: Kill a word, jump to the beginning of the line, jump to the end of the line, go back a word and so on.

[0]: https://github.com/dvcrn/dotfiles/tree/master/vim

Re: Why Kakoune – The quest for a better code editor

#286

If you are wondering why Kakoune and not Vim, the OP claims... (you find following passages later in his post and they don't reflect my opinion) > A design goal of Kakoune is to beat vim at its own game, while providing a cleaner editing model. > Kakoune manages to beat Vim at the keystroke count game in most cases, using much more idiomatic commands. > Kakoune provides an efficient code editing environment, both ver…

In this age we need to think about things like voice control and 3D manipulation of data-structures and a dynamic view of the code. We can truthfully keep designing 2D editors (and we will always most likely use them to some extent) but I believe it is more important to consider different UI paradigms altogether. For instance, what about editing a living code environment? Game development is very immersive: you can m…

There is some movement in this direction

https://www.jetbrains.com/mps/

Re: Why Kakoune – The quest for a better code editor

#287
post #10

This looks awesome (although I think the name could use a little work). It also brings up a question I have for HN: Every few years, I make an attempt to learn to use one of the classic editors like vim or emacs, and inevitably give up after the enormous productivity drop I suffer when writing code. I just can't seem to pick up the muscle memory required to become fast with these tools, and the overwhelming array of…

It is not worth it. I used vi for a few years then switched to emacs, which I used for around 15 years. I "lived" in emacs - terminal, web browser, email. Everything. Now I only use JetBrains IDEs, and have no desire to go back. At some point, you realize that software development involves way more thinking than it does typing.

This is what I'm discovering as well. For the past month I've been learning node.js, express.js and everything that comes with it.

I'm an (inefficient) vim user. I learned vim because I didn't want to ssh into a terminal and type nano. For this purpose learning an editor that is shipped with every (?) unix-system is amazing. I don't know if emacs is also shipped with every unix-system, but learning the basics for the sake of configuring servers is quite handy. I also loved Sublime Text, so I combined using vim and Sublime Text as my main editor.

However, when learning node and writing good javascript I noticed that my debug cycle was very slow. It was so slow that I noticed that I was debugging 80% of the time and writing code about 5 to 10, and thinking about code 10 to 15. So in my case getting a good debugger was a lot more important than having an editor with which I can whizz through text.

So for node.js I switched to Visual Studio Code.

Re: Why Kakoune – The quest for a better code editor

#289
post #16

Earlier quoted context omitted.

My 2cents on how I picked up emacs: Keep using your 'main' editor for coding for now. Get a shell/terminal that you can open/close with a hotkey (iTerm2 on Mac or something like yakuake on linux) Run the editor you want to learn (I recommend emacs) in your hotkey terminal (basically you want an 'always there' emacs that you can just pop open at the press of a shortcut key) Spend 5 minutes learning the basic commands.…

> use … the new editor as your 'scratchpad' or diary. … Google commands as you need them and you'll pick things up bit by bit. I personally found myself using vim a lot as, uh, some sort of poor man's one-shot data analysis/text reformatting tool among other things. What I mean is, quite often I paste in some semi-formatted text like logfile snippet (or open some data that is quite hard to process using shell and ext…

Well, emacs also works great for me in the same type of scenarios.

Re: Why Kakoune – The quest for a better code editor

#290

Earlier quoted context omitted.

I don't use either editor, but just out of curiosity, what functionality is in Sublime that Vim is missing? Multiple cursors? Certain plugins?

Mutli cursor. There is plugins which try to emulate it, but it either didn't work or was lacking a lot functionnality. Other things bothered me, but the lack of good multi cursor implementation was a reason to stop using vim by itself. Just can't live without it now.

Multi-cursor seems very anti-DRY.

If you have parts of code that share so much structure that multi-cursors are useful, you likely want to factor them out.

Post reply on HN