Live data from Hacker News

Why Kakoune – The quest for a better code editor

kakoune.org

201–210 of 329 posts

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

#201

Earlier quoted context omitted.

I find that nearly all editors have VIM "mode" that will allow you to just use the vim key bindings, so it's not really a problem swapping between two editors. They tend to have an emacs mode as well, in case you're interested in using your emacs keys.

Unfortunately, this is superficially true but not in practice all that helpful for a lot of us. Most vim-style input modes or plugins for other editors are woefully lacking, and even very good ones (evil mode) seem to differ enough to be uncomfortable for a subset of long-term vim users. Like: I've used Emacs extensively in the past, and certainly _could_ switch to evil if need be, but a few days of recent effort sho…

I've been using vim for decades and use evil/emacs now.

It's simply not true that the vim modes outside of vim are critically lacking.

In fact almost all of them support text objects and the other key parts of the vim editing experience that we are talking about here and they do it well.

Some things like macros or perfect register support are not there (evil is pretty great though) but they generally have useful analogs.

This is across multiple IDE emulations that I've used.

What you said might have been true 6-7 years ago but is not true now.

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

#202
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…

I move daily between different environments (OS X, Windows, Linux in VMs and on Raspberry Pi) and languages (C, Python, shell scripts).

Switching between different editors on all platforms was a chore. Emacs provides me with the same basic functionality in all environments and for all languages I use. Additionally, it works very similarly both on the desktop and in a terminal, so I can use a powerful editor even in fairly restricted environments.

So yes, for me it's worth it.

I started with plain file-editing, with a focus on keyboard shortcuts for editing. When they felt somewhat comfortable, I started using basic modes (fill-mode for better editing, C and Python modes). As you go along, you'll find things you want to do (format paragraph, autocomplete,...) You'll look them up, and find that they are either built-in, or available as a mode. Rinse, repeat :-)

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

#203
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.

I somewhat agree. I'm proficient enough in vim that I do most non-IDE file manipulation in it, but I haven't gone into much depth about what commands I have available. For example, duplicating a line is ddup. yyp would probably be better, but I already have that in muscle memory and it's good enough for what I use vim for. Like you, I've also switched to Jetbrains for most programming, it's much easier to find the one off commands I know I used last year but can't quite remember how to repeat now.

(Although, some of the reason I switched from vim is that I have been using an Alphagrip keyboard for a while now and mouse/arrow keys are always available _right now_. It really changed how I interact with software.)

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

#204
post #144

> Kakoune’s grammar is object followed by verb This is so important. It's the reason I've stuck by Quicksilver all these years, and avoided Spotlight and whatever Google's search bar thingy is called. I've never been interested in vi because the effort to reward ratio doesn't seem favourable, but I think I'll give Kakoune a try.

Quicksilver, still? Why not move on to Alfred?

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

#205
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…

Pick a small subdomain of your work, and use it exclusively there. Perhaps that's editing config files, or editing when sshed into a remote machine. Maybe for a language you only use in one-off scripts. Something you do at least weekly, but not more than an hour a day. That way you can get regular practice, without a huge productivity drop from going all-in.

Another suggestion: Start vanilla, and slowly add in new commands/customizations slowly. For vim, for the first day, just stay in Insert mode, and move around with the arrow keys. The rest of the week, just add in Command mode, and use hjkl to move around. Next week, add in something else.

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

#206

Modal text editors are definitely not my thing, but anyway this looks like a huge improvement on vim. Still a shame that it is entirely console-based. It's 2016 people! We've had GUIs for literally decades.

Then run it in an (x|e|i|z|gnome|whatever)term? Those things have literally been around for decades.

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

#207
post #155

Earlier quoted context omitted.

If you just replace 'd' with 'y', though, the example is a good one: hitting period would just yank the same thing again. Edit: the yank example is actually way better, because you don't find out that you did something wrong until you go off and paste it somewhere else.

If you aren't sure where you'll end up with, do, in this case mmffffy`m Why would this be better? Because it works in macros too. In vim, you can record it as you go. In vi(nvi), I write it somewhere in the file, basically after I did it once, I would do Ommffffy`m^[0"wDdd and use @W later. You can of course use vim's visual mode, but in this simple case, there's not much difference.

Seriously? What is the advantage of using your cognitive capabilities to write Ommffffy`m^[0"wDdd rather than use a sensible IDE with common refactoring capabilities that are also context aware and integrated with the language you are using?

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

#208
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…

Totally worth it. I felt the productivity drop when I started emacs, but now I fly through editing tasks. I should probably put in the effort for vi as well, but that idea exhausts me :)

I learned emacs by using it as my note-taking editor, not for code at first. I'd have a cheatsheet open and all I needed were the basic navigation commands. Once I was comfortable I started coding in it.

The biggest benefit to emacs is the Mac UI and bash both share the same navigation keystrokes. My hand almost never needs to move over to the arrow/paging keys anymore.

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

#209
post #155

Earlier quoted context omitted.

If you aren't sure where you'll end up with, do, in this case mmffffy`m Why would this be better? Because it works in macros too. In vim, you can record it as you go. In vi(nvi), I write it somewhere in the file, basically after I did it once, I would do Ommffffy`m^[0"wDdd and use @W later. You can of course use vim's visual mode, but in this simple case, there's not much difference.

Seriously? What is the advantage of using your cognitive capabilities to write Ommffffy`m^[0"wDdd rather than use a sensible IDE with common refactoring capabilities that are also context aware and integrated with the language you are using?

because you can just write a mapping or function that does that.

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

#210
post #122
post #98

Earlier quoted context omitted.

That's why I tend to use visual mode. It sounds like Kakoune is basically visual mode by default, which is cool but not that different. This example was a bit silly: "dtf will delete to next f, if you then realize that was one f before the one you targeted, you need to undo, go back to your initial position, and try again with d2tf." There's no need to undo. Just follow up with a dot and you're done. Which pretty muc…

Which is to say that they don't understand vim, or rather, they don't even grok vi. You can't beat your enemy if you don't understand your enemy. "Go ahead and down vote more, I just wish you guys can learn more of vi, so you can truly deliver something better. So far, these surface scratching alterations only build on irritations of those vi first-timers. Good luck. "By the way, I use acme when I have graphics inter…

>I just wish you guys can learn more of vi, so you can truly deliver something better. So far, these surface scratching alterations only build on irritations of those vi first-timers

Mind expanding on that, or are you just going to whine? It's not like vi is the ultimate tool.

Post reply on HN