11 ms·
Why Kakoune
- Gualdrapo 3y ago> Kakoune gives you: > Small and understandable core. > Proficiency with POSIX tools, and maybe even some programming languages other than sh. > Structural regular expressions as a central way of text manipulation. > With multiple selections created via regular expressions, acting upon regular expressions. > Fresh take on the modal editing paradigm. I wonder if the author has ever heard of vis[0] which imho fulfills far better each one of those premises [0] https://github.com/martanne/vis https://github.com/martanne/vis
- deleted 3y ago[deleted]
- BaculumMeumEst 3y agoi remember him mentioning that he had at least heard of it in a post from years ago. vis is cool but its structural regular expressions are much less easier to use since kakoune's give you feedback in real time. it is nice that vis actually has a lua API though.
- lapinot 3y ago> I wonder if the author has ever heard of vis[0] Yes. https://github.com/martanne/vis/wiki/Differences-from-Kakoune https://github.com/martanne/vis/wiki/Differences-from-Kakoun... https://github.com/mawww/kakoune/wiki#onboarding https://github.com/mawww/kakoune/wiki#onboarding > which imho fulfills far better each one of those premises Not very motivated for such a harsh critic..
- gilcot 3y agoNote that all of those (but with some limitations on multiple selections via RE) are available in Ex/Vi and Ed previously. > I wonder if the author has ever heard of vis[0] which imho fulfills far better each one of those premises Same goes for Sam…
- alexvitkov 3y agoIs it worth learning Dvorak? Sure it makes sense on paper, I see the rationale behind it, but I've already been typing on QWERTY all my life and I'm pretty fast at it. Kakoune is the same thing for me - the things changed from Vim make sense, but I don't see it as good enough to offset the facts that: 1. Vim is muscle memory for a lot of us. Something that is so similar but not quite the same just fucks with my brain. I have an easier time using stock Emacs bindings than Kakoune, as my brain is not in Vim mode while using it. 2. VS Code, Fat Visual Studio, IntelliJ, Emacs, most IDEs/text editors, fuck even Compiler Explorer have Vim plugins that range in quality from acceptable to fantastic. You can get a fix for your vim needs even in a disgusting corporate Windows crackhouse environment. 3. If you're a purist, Vim itself has a great ecosystem, and can be reasonably used for a lot of tasks.
- rbits 3y agoThe second point is the biggest reason why I haven't switch to Kakoune or Helix yet. I've used vim for just over a year now and I'm still annoyed at how unintuitive some things are, I still can't remember half of the shortcuts. I tried out Helix and it's great! I especially love the multiple cursors. But I never use vim by itself, I use it in other apps. And there's a perfectly good Helix plugin for VSCode, but I also use vim mode in Obsidian (since I'm constantly switching back and forth between Obsidian and VSCode) and there is currently no plugin for anything else. I need my code editor and my note editor to have the same controls, otherwise my brain gets confused. Once a Helix or Kakoune plugin is created for Obsidian, I am switching straight away.
- mbork_pl 3y ago> I need my code editor and my note editor to have the same controls, otherwise my brain gets confused. I fully agree – but why use two separate editors, then? (Full disclosure – I'm a long-time Emacs user, making most of my notes in Org-mode.)
- petr25102018 3y ago> Helix plugin for VSCode Which one?
- bern4444 3y agoI love that we have so many choices for editors. VSCode, Vim, NeoVim (+ vim distros like astro etc), emacs (+ emacs distros), Kakoune, Helix etc. Its awesome to have so many choices so everyone can pick the system that best fits them. It also encourages better tooling that can fit on top of any of these like the Language Server Protocol, TreeSitter etc which benefit everyone. Thanks to everyone for working on all these projects and tooling, its truly incredible.
- seanw444 3y agoIt's definitely never been easier and more free to tinker and write code than now. Cool times.
- Conscat 3y agoKakoune has the nicest regex interaction I've ever used in a text editor. It's feature complete and accessible from a single keystroke out of the box. You can write key macros that input regex to do surprisingly complex motions without any scripting language.
- satvikpendem 3y agoFor those that have used Vim/Neovim, Kakoune, Helix and other terminal editors, which one is your favorite? I use VSCode and have been looking to switch, I use Neovim inside VSCode (without the emulation of something like VSCodeVim) [0] which is decent but that's mainly because I don't want to set up all the plugins for Neovim again. Helix seems interesting because most things are built like with VSCode, it just works™, but I have to learn a new keyboard control scheme. [0] https://github.com/vscode-neovim/vscode-neovim https://github.com/vscode-neovim/vscode-neovim
- haolez 3y agoI think the biggest benefit of going away from something like VSCode or IDEA is frictionless creation and integration of new tools. VSCode and IDEA usually require you to write plugins to achieve a deep level of customization for your needs, which causes a lot of friction. In an environment like Vim and Emacs, you can make quick scripts that create new features for your project that you wouldn't have created otherwise. I'm currently using VSCode, but I don't code a lot these days. If you are looking to explore a new paradigm like that, I would go with Emacs as a practical option (with vi bindings) and Acme as a way to open your mind (but not very practical).
- satvikpendem 3y agoTrue, that is a benefit, but realistically though, I probably won't be writing any scripts or plugins myself for the editor I use, same as with VSCode, I just get them from others or on the Extension Marketplace.
- kaba0 3y agoHow is this different than writing a plugin?
- haolez 3y agoThe intermediate state where your "plugin" is just a one-off script that you wrote and ran in a single buffer, without a build system or IDE SDK.
- r3trohack3r 3y agoI've been using Kakoune as a daily driver for about 2 years now. It's an order of magnitude better than anything else I've tried (vim, neovim, vscode, atom, jetbrains, codeblocks, notepad++, etc). Especially once you: * enable LSP support * memorize the keybinding * get comfortable with the kakoune scripting language The keybindings were a lot easier to memorize than VIM's because of how consistent they are. And they're a lot easier to "experiment" with when your memory is fuzzy because you get realtime visual feedback on what your key combinations are building up in memory before it executes. It's fast, unbelievably fast - faster than I type no matter what I'm doing. I never wait for anything unless I'm shelling out to some "modern" build/lint/style tool with a script. It works out of the box with tiled window managers (:new opens a new terminal, `kak -c lets you open a new window into an existing editor session, etc.). I can seamlessly move between the system clipboard and buffers using `xclip`, which is the same pattern that lets me seamlessly move between _any unix tool_ and a buffer. I can type `!tree` and get the directory listing for a README. I can `%s [][]bytes<ret>di[]Image` to replace all arrays of images with an explicit type. With LSP support, I can highlight all _references_ the the currently highlighted variable/object/w.e., then select the entire line each one is on and delete it in like 4 keystrokes. It gives realtime feedback as I type commands so I can see what I'm selecting in a buffer. Autocomplete is aware of everything from LSP and _every open buffer_, so you can open buffers full of context you'd like autocomplete to have access to even if LSP isn't able to infer it. I can wire up custom commands for each file type using the scripting language in minutes, not hours, to do things like automatically run the language's auto formatter. With LSP enabled, I can `gd` on any variable/object/function/w.e. and _immediately_ find myself looking at where it was defined. Even if that definition is the go standard library, Node core, some dependency down inside my node_modules or vendor directory, w.e. With LSP enabled, I get the entire MDN library fact-checking my method signatures and helping me with autocomplete _in realtime_ as I type. Some tips for people wanting to use kakoune: Add this bash script to your PATH as `k`, it lets you open a new window into the current editing session from any terminal - so you can `cd` around the filesystem to look for files of interest and then open them in another terminal's editing session top copy stuff over and make autocomplete aware of its contents: https://gist.github.com/retrohacker/8920d056f4938e8dd263adac5467202d https://gist.github.com/retrohacker/8920d056f4938e8dd263adac... Take the contents of `:doc` and put it all into something like Anki (or just make flash cards for yourself). Learning the keybindings by heart is a small investment that will pay massive dividends. Integrate LSP and take a moment to learn the different commands. I can't stress this enough. Wait until about 6 months in to bother trying to learn the scripting language. The scripting language is pretty much what you've been using the entire time, you just write it down in a config file instead of typing it into a live session. The scripting language docs don't make any sense unless you already know kakoune, it's much easier to understand once you have a better feel for how kakoune works. Once you learn the scripting language and have a good feeling for the default keystrokes, you can start mapping a bunch of your common workflows (`!` and `:` commands, buffers, etc) to unused keys, or keys you have no use for. Here is my kakrc for reference, but keep in mind I change this fairly often as my workflows change across code bases: https://gist.github.com/retrohacker/cfc72d59dbcb14adb5009a264d0e4cf7 https://gist.github.com/retrohacker/cfc72d59dbcb14adb5009a26... I think the hex to HSLA is a pretty good example of what's possible with kakoune. I whipped that up in maybe 10 minutes with a go binary on my path and that hook. I'm in a code base where I was constantly converting from a color design guide defined in HEX to the code base's standard of hsla. Now I just copy into the editor and it auto-fixes it.
- DixieDev 3y agoI got quite annoyed with Neovim config at some point and tried out Kakoune, and ended up contributing some window splitting code to the main repo for Sway. I liked it quite a lot, but it's not built with Windows in mind so I ended up crawling back to Neovim. I'd be interested to hear of any Kakoune-like editors with better cross-platform support/design.
- welder 3y agoI thought nobody used Kakoune anymore... maybe I'll go ahead and fix the bugs in the Kakoune WakaTime plugin https://github.com/WhatNodyn/kakoune-wakatime https://github.com/WhatNodyn/kakoune-wakatime.
- eviks 3y agoThat reads like a why not: > Kakoune made me learn Perl ... Awk ... POSIX sh ... regexes But these aren't great ergonomic tools, so it's not a good thing that Kakoune "requires" them, it's rather a testatment of how much it's lacking on its own (though haven't used Kak since it's unfortunately not x-platform, the selection first paradigm is totally a superior UI to the hidden vim ways)
- forgotpwd16 3y ago>so it's not a good thing that Kakoune "requires" them It doesn't. Author learned them because they made plugins and complex custom commands. The configuration language allows embedding shell scripts but Kakoune provides a POSIX interface so can use whatever language you want for plugins. Regexes are needed to be productive utilizing the full extend of text manipulation provided. Can do without but you miss a big reason for using Kakoune in first place.
- eviks 3y agoI've added quotes specifically for you - as you notice yourself, you do miss a lot by not using these things, so to use Kakoune properly you did need them I take your point about any language (which is great), but then the foundation of that is broken - it excludes the most popular desktop OS Windows (besides its other flaws that might not be relevantf to Kak integration), that's why "forcing" to learn posix isn't an argument for
- deleted 3y ago[deleted]
- jwmcq 3y agoOdd choice of words. I'd say that perl, awk, regex etc are great ergonomic tools - if anything too ergonomic. The main problem with them - and the probable source of their bad reputations - is that the ease and comfort (the 'ergonomics') of just cobbling something together something that works and then throwing it out there does not encourage good engineering practices. Do I need good engineering practices in my day-to-day text editing? Mostly not for what I do myself, but I'm grateful that the maintainers of the emacs packages I use have better tools to work with.
- Hammershaft 3y agoI'm currently using Kak for system configuration, limited shell scripting, and soon, learning Zig. (I use evil emacs for all of my heavy duty coding (lisp mostly)) Kak is such an elegant form of modal editing compared to Vim & Emacs. Selection first paired with feedback & suggestions gives Kak a discoverability emacs & vim simply do not approach. This also means you can pick up and learn Kak in a fraction of the time you'll learn the others. I recommend finding or creating a purpose for Kak if you're interested in the tools you use and how they can be made better.
- dang 3y agoRelated. Others? Even more hindsight on Vim, Helix and Kakoune - https://news.ycombinator.com/item?id=36427267 https://news.ycombinator.com/item?id=36427267 - June 2023 (115 comments) Why Kakoune – The quest for a better code editor (2016) - https://news.ycombinator.com/item?id=36424256 https://news.ycombinator.com/item?id=36424256 - June 2023 (89 comments) More hindsight on Vim, helix and kakoune - https://news.ycombinator.com/item?id=36066347 https://news.ycombinator.com/item?id=36066347 - May 2023 (1 comment) Kakoune Code Editor - https://news.ycombinator.com/item?id=29975052 https://news.ycombinator.com/item?id=29975052 - Jan 2022 (170 comments) Kakoune, a punk-rock text editor - https://news.ycombinator.com/item?id=24716187 https://news.ycombinator.com/item?id=24716187 - Oct 2020 (2 comments) What you could steal from the Kakoune code editor, and get away with - https://news.ycombinator.com/item?id=24685267 https://news.ycombinator.com/item?id=24685267 - Oct 2020 (94 comments) Kakoune – A Modal Text Editor - https://news.ycombinator.com/item?id=19313794 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 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 https://news.ycombinator.com/item?id=13165919 - Dec 2016 (327 comments) Kakoune: a better code editor - https://news.ycombinator.com/item?id=13152499 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 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 https://news.ycombinator.com/item?id=9764028 - June 2015 (15 comments)