Live data from Hacker News

Kakoune Code Editor

kakoune.org

51–60 of 176 posts

Re: Kakoune Code Editor

#51
post #46

Earlier quoted context omitted.

Doing the motion first lets you visually confirm the range before invoking the command. You also have the opportunity to adjust the range if you didn't get it quite right. Mnemonically the vim order works better for English but in practice I find the visual feedback from selection better for anything even moderately complex. An example would b `f` or `t` since I tend to hit the letter I was aiming for earlier than I…

I have never felt the need to visually confirm something as obvious as "delete 1 word". On the other hand, you cannot do something like "delete 3 words" in kakoune. "3wd" just takes you to the third word and deletes that. Deleting 3 words is definitely slower. And it's kind of infuriating... What am I doing wrong?

Lowercase w resets (each) selection to end of selection, skips any whitespace, and selects to next word boundary, so www or 3w will select third word counting from cursor. Uppercase W extends selection over any whitespace and then to next word boundary, so WWW or 3W will select from cursor to third end of word. (Most other movements are also in lowercase resetting / uppercase extending pairs.) Thus with length-1 (that is, initial-state) selection you can do wwwd or 3wd to delete third word and preserve whitespace, wWWd or w2Wd to delete three words but preserve whitespace, WWWd or 3Wd to delete three words and any whitespace between cursor and start of first word.

That is, counts work, it’s the movements that are slightly different. See manual §3.4–6[1].

[1]: https://github.com/mawww/kakoune#34-movement

Re: Kakoune Code Editor

#52
post #32

Once you realise that it's, er, let's say, inspired by vim, you look at the logo and see that it's basically a clone of the vim logo/icon - the orange part of the K looks like the V in the vim icon, and the green lozenge background is almost exactly the same. Which makes it even stranger that they are trying to hide that - there is no mention of vi/vim on the site's landing page. Ok, I understand that they are wary t…

Maybe not on the landing page, but there's a large button saying "Learn More about the Kakoune philosophy" that leads to this page [1] that mentions vim 5 times and vi 11 times, including:

"It first started as a reimplementation of Vim"

"A design goal of Kakoune is to beat vim at its own game, while providing a cleaner editing model"

"Up to now, I have used vi as an example for modal text editor, mostly because I expect most programmers have at least heard of it. However, I don’t believe vi and clones are the best modal text editor out there."

and so on.

1: https://kakoune.org/why-kakoune/why-kakoune.html

Re: Kakoune Code Editor

#53
I've been using this over the past few months and so far, the only thing that really bothers me is that there's no UTF-8/Unicode category selectors support in their self-rolled regex engine, citing not wanting to ship a unicode character database to keep the editor small (only mentioned on IRC, sorry). This makes writing syntax highlighting extensions a pain/difficult to maintain[1].

---

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

Re: Kakoune Code Editor

#54
Past related threads:

What you could steal from the Kakoune code editor, and get away with - https://news.ycombinator.com/item?id=24685267 - Oct 2020 (94 comments)

Kakoune – A Modal Text Editor - https://news.ycombinator.com/item?id=19313794 - March 2019 (58 comments)

Why Kakoune – The quest for a better code editor - https://news.ycombinator.com/item?id=17781780 - Aug 2018 (45 comments)

Why Kakoune – The quest for a better code editor - https://news.ycombinator.com/item?id=13165919 - Dec 2016 (327 comments)

Kakoune: a better code editor - https://news.ycombinator.com/item?id=13152499 - Dec 2016 (2 comments)

Kakoune – An experiment for a better code editor - https://news.ycombinator.com/item?id=10484653 - Oct 2015 (34 comments)

Mawww's experiment for a better code editor - https://news.ycombinator.com/item?id=9764028 - June 2015 (15 comments)

Re: Kakoune Code Editor

#55
post #26

Does anyone use this daily? this gets posted a few times a year to HN but tbh it looks like someone just re-invented vi. Which seems kindof like creating a new religion. It can be done, but even the best televangelist isn't going to hold a candle to the spread of the catholic church.

I tried to use it enough to see if I could switch to it from (neo)vim. I liked a lot of the ideas in it, and in some ways I liked it more than vim, but it was missing some functionality that I just couldn't live without. Some things could be solved by plugins that just didn't exist yet, but others, I couldn't even see a way a plugin could be implemented. In particular, there isn't any way to get a diff mode comparabl…

I don't understand the new line thing at the end. I haven't used a utility or app in -decades- that cared about whether you have a blank final line.

Re: Kakoune Code Editor

#56
post #53

I've been using this over the past few months and so far, the only thing that really bothers me is that there's no UTF-8/Unicode category selectors support in their self-rolled regex engine, citing not wanting to ship a unicode character database to keep the editor small (only mentioned on IRC, sorry). This makes writing syntax highlighting extensions a pain/difficult to maintain[1]. --- [1] https://github.com/mawww/…

I understand not wanting to ship large tables, but then why not ship the scripts to generate the tables from the publicly available source of truth?

Re: Kakoune Code Editor

#57
post #30

Anyone else spot the iso646.h macros[1] in the screenshots? E.g., https://github.com/mawww/kakoune/blob/master/src/buffer_mana... [1]: https://en.wikipedia.org/wiki/C_alternative_tokens#The_macro...

Since Kakoune is a C++ codebase, they're standard language keywords, not macros.

Re: Kakoune Code Editor

#58
post #47

Earlier quoted context omitted.

AFAIK the creator got the inspiration from Vim, but I think the other statements about github, not mentioning vim, etc. Are just products of your imagination

That the landing page doesn't mention vi/vim or open source is definitely a fact. Of course the reason for not mentioning vim was a product of my imagination, but actually I just wanted to say that I think it's odd for them to avoid stating the almost-obvious...

> avoid stating the almost-obvious...

I feel it's in the nature of communication to avoid stating the obvious and only becomes problematic when what's obvious to the sender is not to the receiver.

Paradoxically while too much obviousness makes a statement banal, being the first to explicitly state what's obvious to everyone is extremely insightful... :)

Re: Kakoune Code Editor

#60
post #15

Note the existence of kakoune.el, an emacs emulation of Kakoune's core: https://github.com/jmorag/kakoune.el I have no idea how well it reproduces the experience - I'll probably be using vim on servers and emacs evil-mode locally until the day I die, so I haven't bothered to get into Kakoune, awesome though it seems.

Why would you even bother making Emacs look like Kakoune? Funny how it seems a lot of Emacs developer time is spent a) making it look like / act like something else and b) making it do things unrelated to editing text. There is no focus. It's good that it can do a lot but it doesn't do any of those things well (unless you want to learn some cryptic key combinations that make less sense than vim). Meanwhile the rest o…

> Why would you even bother making Emacs look like Kakoune?

Because somebody wanted the Kakoune core editor behavior combined with the world of features emacs gives you.

> Funny how it seems a lot of Emacs developer time is spent a) making it look like / act like something else

Somebody found this useful. Would you have preferred that this person didn't do any of this at all?

> and b) making it do things unrelated to editing text.

Yes. Unlike vim and kakoune and others, emacs is much more than a text editor.

> There is no focus.

What focus? Somebody wanted to do this for themselves. There's no "emacs, inc" that sets the focus that all devs follow. This is how free software works.

> It's good that it can do a lot but it doesn't do any of those things well

I'm going to go out on a limb, and guess you aren't an emacs user? It does most of those things fantastically well.

Post reply on HN