Kakoune Is A More Efficient Text Editor
Vložit
- čas přidán 22. 05. 2020
- The age old question is what's the best text editor: Vim or Emacs? Well, there's a third editor that needs to be considered. And no, it's not Nano. I'm talking about Kakoune, a modal text editor that claims to be more efficient by using less keystrokes and being less mistake-prone.
REFERENCED:
► kakoune.org/ - Kakoune Website
► github.com/mawww/kakoune/blob... - Trampoline Tutorial
WANT TO SUPPORT THE CHANNEL?
💰 Patreon: / distrotube
💳 Paypal: www.paypal.com/cgi-bin/webscr...
🛍️ Amazon: amzn.to/2RotFFi
👕 Teespring: teespring.com/stores/distrotube
SOCIAL PLATFORMS:
🗨️ Mastodon: mastodon.technology/@distrotube
💬 IRC: irc://freenode #distrotube
👫 Reddit: / distrotube
📽️ LBRY: lbry.tv/$/invite/@DistroTube:2
DT ON THE WEB:
🕸️ Website: distrotube.com/
🐿️ Gopherhole: gopher://distro.tube
📁 GitLab: gitlab.com/dwt1
FREE AND OPEN SOURCE SOFTWARE THAT I USE:
🌐 Brave Browser - brave.com/dis872
📽️ Open Broadcaster Software: obsproject.com/
🎬 Kdenlive: kdenlive.org
🎨 GIMP: www.gimp.org/
🔊 Audacity: www.audacityteam.org/
💻 VirtualBox: www.virtualbox.org/
Your support is very much appreciated. Thanks, guys! - Věda a technologie
This is the text editor I've been dreaming of! Literally, I've been conceptually designing my ideal text editor, and this is it! Motion before action so you can see your selection, a menu of text objects, documentation hints as you type a command, multi cursor selection based such as for find and replace, the unix way... everything I've been dreaming of. Thank you so much for sharing. I'd never heard of it.
There is also another option called Helix
Wanted to point out the main difference between `|` and `!` commands. Pipe, just like in terminal, is for piping the selections to shell. That means you can do cool things like sorting lines of a paragraph with ` p | sort ` or replace a simple arithmetic equation, such as "2 * (5 + 3)` with it's evaluated form by selecting it and piping it to command such as `calc`: `| calc -p `.
Both of these examples can be mapped under user mode, so that you can quickly sort with `,s` or evaluate arithmetic expressions with `,=`.
ohw, piping the selection to terminal, and piping back the output in the editor - wow, super nice
Both Vim and Emacs users are preparing for a war, this time, against a common foe. They’ll have to collaborate, as the foe has the most powerful weapon - CLIPPY.
This is by far the lesser editor. Not even worried about silly shit like clippy lol.
I've been waiting for someone notable to make a proper video on kakoune! I love this piece of software and have been using it for quite some time now.
Kakoune is indeed impressive. Its philosophy page is really interesting, and I hope it can see more adoption in the future. Being able to see and manipulate what you're going to operate on, with modal editing, is a must. I love it, be it just for the "split" operation.
It's still lacking some plugins or distribution like you have Doom for Emacs to replace it for me, but it's a promising editor that deserves your attention and a serious try!
@Вероника Заглотова that sounds like using kakoune, but with extra steps
@Veronika Zaglotova I wondered where I saw you before. Then I saw how many comments on this channel you have. 😅
DT changes editors like other people change their underwear.
If you mean "three times in the last year" then I would recommend those people put on a fresh pair of undies a bit more often.
LOL
not to be rude but he's not a programmer or does anything with computers so maybe that's why he can change to this weird programs that change everything just because.
YES, thank you for giving Kakoune a spotlight! I think this is editor is vastly underrated.
agreed
Thank you, Derek. I had not heard of this as yet. Saved for reference.
Having the object before the verb is actually quite rare in languages. Latin preferred this SOV word order (e.g. "Valerius Iuliam amat." SOV = "Valerius loves Julia.") but Latin also had a very flexible word order, due to a very robust case system in which the subject was in the nominative case, and the (direct) object in accusative (thus "Valerius amat Iuliam." SVO is also valid, as well as "Amat Valerius Iuliam" VSO and "Iuliam Valerius Amat." OSV, etc.).
What's the point of this comment? I just had a random thought that Ancient Romans would prefer Kakoune over Vim, while Ancient Egyptians would prefer Vim: in Middle Egyptian, just like in English, the word order is very strict, and, in most cases, VSO (unlike English SVO).
Also, Luke Smith told me it's a good idea to learn ancient languages.
Good point. My opinion is not in context of Kakoune or editors or the video. But it's about the comment you made:
One point that you missed is the fact that SOV is not a dead/rare format. Yeah, most languages support it since they are flexible (Like Spanish) but it's the primary format of many popular/elder/alive languages right now. Farsi/Persian as an example, primary language of many Middle East countries and secondary to many more (An early node in Indo-German language trees, yeah it's ancient kinda but still super popular and growing) (Even tho Farsi is 'flexible' too);
Or Turkish as an another example, even Russian (and many more that I don't personally know so I'm not sure if it's the native, official format or not, in any case, copying from Wikipedia: en.wikipedia.org/wiki/Subject%E2%80%93object%E2%80%93verb like:
Chinese, Dutch, French, German, Hindi, Japanese and...
So if I were living under a rock and had no idea about SVO or VIM(-like bindings), I would probably have an easier start with Kakoune...
But come on... what are we talking about here xD
Turkish uses this format.
No it's not. Almost half of the world's language are SOV. The other half SVO. And this is a simplistic take as in Japanese or Korean it's rigidly verb final but in Latin and other European languages different orders are used for different things and so the verb may not be final (though this is the default order). In Latin it is not random, you can't just pick and chose, different orders are used for different things.
While I like the centiment of the previous reply, I would like to point out that Japanese doesnt strictly use verbs in the end of a sentence, it’s just the common case. You actually use particles to signify what function a word serves in the sentence. In japanenglish: ”Ibreadeat”, but you could also grammatically do ”eat bread I” (watashi wa pan wo taberu = taberu, pan wo watashi wa (a bit strange but ok) = pano wo watashi wa taberu = watashi wa taberu, pan wo )
I want to thank you for this video. This video is what made me aware of Kakoune, and I almost immediately switched to it. It solves my biggest complaints with Vim, and is significantly simpler in every way. It doesn't have decades of bloat and hidden features like Vim does.
I've been daily driving Kak for over a year, and it is serving me well. There are a few rough edges though. Code folding does not work, indentation hints are impossible, and making plugins that run alongside Kak (such as kak-lsp) can be pretty clunky. But the core concepts are executed so well that the rough edges pale in comparison.
the essential feature that makes me consider a switch to kakoune, apart from all the things you mentioned is the client-server architecture. I am actually glad that there are no splits and windows management in this text editor. All that stuff would be bloat, since it can already be done with a program specific for that task like tmux, which is easily scriptable.
have you switched to kakoune or something else? how is it?
Not OP but I, a fan of the Unix philosophy, am really liking the editor after switching to it. You can easily extend it with shell scripts, and a lot of the things DT mentioned are preinstalled plugins, so you can get rid of them if you feel they're bloat, unlike vim where you would have to patch the source code
An important mention for programmers is probably kak-lsp, which let's you use a language server for better auto complete
this helps a lot DT. I tried kak years ago, got frustrated and left even though I saw how I efficient it could be.
Great video, It is interesting that it has only 2 modes, I always thought vim's Visual mode is very powerful.
Then you'll love kak because kak's "normal" mode is much more like vims "visual" mode
The | (pipe) mode actually pipes the selected text into the command you give it, so you can use it e.g. to sort some lines with `sort`.
I wonder if I can pipe selected text into ed...
@henry stevens ED IS A STANDARD TEXT EDITOR
Hey DT, have you tried alternate keyboard layouts yet? I'm 2 weeks into the Neo layout and I like it a lot. Check out Layer 3 of it as well
anyone know where I can make it so kak always has numbered lines every time I open kak I have set it up again, correct me if I am wrong but I don't think there was anything in this video that tell us
i'm trying this out the next time i have a free moment. thanks for the video. and subscribed!
Hey Derek, you're the best Linux CZcamsr!
Amazing channel!
Hey, thanks!
@@DistroTube Because of you I ditched Windows and started using Ubuntu. Now trying to make a switch to Arch Linux. Also started with awesome and i3 window managers. A big thanks to you for the great content and inspiring me. Keep it rolling 👌
is nerd tree needed? aren't things like ranger or NNN better for this?
also, what is a . . . [checks notes] . . . "mouse"?
It's funny, I actually use vim this way a lot, I start by hitting v to enter visual mode, select the words I wanna change or delete, and the last key I type is the action. Probably the people who designed this did the same time. Or they are Japanese and want to end on verbs.
Same here hahsha, but i think visual mode is more effective. Btw, i started using "dw" and "cw" a lot, they're great commands.
@@twb0109 Of course I don't use visual mode for just one word. I'll also ct( or ci" without visual mode. I don't even mind dfn dot dot dot. I hardly ever prepend a command with a number, so all my numbers are remapped in normal mode. Mainly I just tend to like the visual confirmation for vip or moving by paragraph to delete a bunch of blocks.
One tip you might not know yet is ctrl v for visual block, move down a few lines, shift i or shift a to insert something on multiple lines, which comes up often enough if you use an alignment plugin especially. Works with c and d as well.
"Or they are Japanese and want to end on verbs." ... or Yoda :D
Ending in the verb is actually based on English. The text object is your direct object, not your subject. The editor is the subject implicitly. "Vim deletes 5 words." is the thought process behind its design. "5 words are deleted by Kakoune." is more like the Japanese way you refer to.
Thanks! BTW how is it call the little program to show on screen what you are typing?
Install a program named 'screenkey'. It should be in every Linux distro's repos.
@@DistroTube Thank-you!!
Great video. Keep up the good work
Kakoune looks really interesting, I really like the workflow. I'm definitely considering switching to it when it's got a more fleshed out ecosystem
@Didac Cerver fair enough, I guess I'll have to look into the plugins a bit more. Just worry that I won't be able to approximate my current vim setup
@Didac Cerver looking at it now, it seems like it uses the alt key a lot, which I'm not a fan of. I'll take a closer look at it to see if I can avoid them, but yeah it it's important that could be a dealbreaker
@Didac Cerver unfortunately my hands are a bit small and my keyboards have alt pretty far to the left of spacebar. Alt is below z and x, which is nowhere near my thumb. My thumb ends up having to reach underneath my palm to press alt
@Didac Cerver Fair enough. I'm considering a new ergonomic keyboard with thumb clusters, which could resolve this problem nicely, so hopefully I'll be able to give kakoune a shot
@@ginxxxxx no I really hate the emacs key combos. They don't make up the majority of movement for kakoune, but they do for emacs as far as I know.
Hey dt, I don't know if you'll see this message, but i copied your xmonad files. Tried to change some key config but it seems to not work. Also the xmobar doesn't show up, even though I changed the path to the configs. For example, i de-commented the dmenu-run line. If i change the config to some other key (say, M-d) it works on both M-p and M-d. But if i change it to rofi -show run, it still shows dmenu, even if I run in the command it works. Am I doing something wrong?
No clue. But then again, I don't have much information to go on. Xmobar doesn't launch? Try launching it from a terminal and see if it launches. If it doesn't, at least the terminal will hopefully give you some output as far as what might be the problem. Other than that, my config works. So if you change something and it breaks, then you know your changes are a problem. Beyond that, go to the proper support channels like /r/xmonad on Reddit or to the xmonad IRC channel. Because CZcams sucks as far as trying to give someone support on an issue.
@@DistroTube if i run xmobar in the terminal (with an argument about the location of the file) it basically shifts the windows down but nothing appears. The terminal says:
[1] 10718
AsyncCancelled
About xmonad, I'll see to get help on the irc channel, since on Reddit i didn't get much luck. That will be something else because i never used an IRC and i Don't know the basics lol (I'm a smooth brain dude)But it seems that it doesn't quite recognize the changes that i Make. I changed dmenu back to M-p but M-d stills launches it.
Thank you very much for your help though!
@@clouddaemon4828 IRC can be amazing for support. Good luck!
One other thing you should do is post your config (I notice you didn't do this on r/xmonad). It would help us spot obvious problems like a misspelled command or bad spacing or punctuation.
@@DistroTube well, my config file is basically yours 😂 I just changed some directory to change my name, and the dmenu line. But sure, I'll post it on Reddit and see what they have to say. Thank you for your patience and time
'Kak' means 'shit' in Dutch. I'm hooked.
What software is he using to display the keyboard input on the screen??
screenkey
What operating system do you use? The aesthetics got me curious
Geany never ever failed me
CLIPPY??!!!! Sold.
^^ This guy gets it!
@@DistroTube Love your content! Don't stop tinkering!
What about ne(nice editor), why this old project not popular instead nano?
Derek "I could p a million times" Taylor
I wish p was my middle initial! :D
What is the name of the Application that shows your Keystrokes?
Thanks, Derek. If I ever want to use something other than Emacs, I'll use vim over kakoune. But it is helpful to see the alternatives.
Once you go emacs, you don't go ebacks.
@@superscatboy Hahahaha.. True, that.
That nice feeling when you search for an intro. video on something and the first result is a DT video ;)
Interesting , had not previously known about this text editor and its in my default repo and does seem vim-like, minus the split and French style subject verb switch.
Will you be checking out Helix too?
Another text editor is Vis
An obscure one from Japan is the Hide Maruo editor
there's something called Helix, and they say that it has been inspired by Kakoune
how does it compare to nano
Why would someone need NerdTree? Isn't it easier to just start fuzzy typing a filename and have the editor find it for you? Maybe it's hard to remember all the names... But I just use fewer files as creating more files makes code harder to navigate, understand, and maintain. Modern IDEs and OOP has brought coding backwards about 40 years. :-(
next up: helix (which's inspired by kakoune)
oh, and also, a more relatable way to put "object verb" or "action last" for programmers is that it uses "postfix notation" whereas neo/vi/m use "prefix notation"
have you tried micro editor??
would be interesting to see a tutorial on xi editor
there is a nerdtree-like plugin that uses tmux.
and for ide like experience there is lsp intergration with kak-lsp
Which color scheme do you use on text editors/terminal?
He uses Dracula
it's funny that you say the first thing you do is enable the mouse. Most modern linux distros I have used enable that by default, and I immediately disable mouse :)
reverse order is really nice, redo, undo and text suggestions
how about a video on vis editor
one of the best vi family editors which has been overlooked
Is Vis better than Kakoune?
@@GreyDeathVaccine "Well no, but actually yes". Vis is even younger than Kakoune but imho is better in its usage, so if you're bummed about kakoune's lack of plugins or ecosystem, there's even less of that on Vis. For the so-called "power users" it's gonna be lacking, but for a pedestrian like me it's amazing.
On the other side, vis is closer to vim, its documentation is not as confusing as kakoune's, and it joins the modal editing of vim with Acme's structural regular expressions, which lets you do pretty impressive stuff you won't be able to do as easily with kak or vim.
Also joes own editor
please, one more video on kak
Does anyone use it for golang?
There's a wiki plugin for kakoune, and it works great. Unlike vimwiki it uses markdown out of the box.
Since kakoune doesn't have splits, moving text around in a big document is a pain. I have yet to learn how to open one file in multiple tmux windows/panes.
Getting started with the rc, as with n/vim, is not documented for the new user.
Kakoune works well for Unix developers because Unix is an IDE.
Not everyone needs to or wants to point and click on buttons in a graphical IDE.
An IDE is not the same thing as a GUI, moron.
GUI made people stupid and unproductive.
Oi mate, maybe have a look at helix next?
Does anyone know why I've added the highlighter for the number lines but it only applies it to the current session? It's not that I care too much about it, but it kinda bothers me the fact that I don't understand what's happening
I think as an editor, Kakoune is the best out of all of them. Better than both Vim and Emacs. But I'm still using Vim, because there's tooling and plugins I need as a developer that I never quite got working in Kakoune in a way that didn't feel brittle. I wish this wasn't the case, because Kakoune would leave Vim in the dust otherwise. Emacs is it's own category, but as an editor, I think Kakoune leaves it in the dust as well.
I think I vacationed once in Kakoune
Hey DT, I see you've started using anime/meme thumbnails, it's a little more interesting and should attract more views. But I'm curious do you like them?
Trampoline = jump start
When's Ed?
I really enjoyed using kakoune in the past, but I found the configuration to be really confusing.
I agree that the documentation on configuration is not ordered in a particularly intuitive way, but the configuration system is awesome one you future it out
Hey DT, is Helix a more fleshed out version of kak?
Kakoune is awesome, switched some weeks ago.
Lets see you text editor hop to nano
Yo, I've been using Nano for more than a year now and I shifted to Vim like yesterday lol. So far so good.
Nano is pointless once you spend an hour learning vi. The only reason why nano exists is because people are too lazy to try vimtutor for 20 minutes
ed gang.
Vim > everything
@@eddyecho agreed but you can't say nano is pointless. It's best for quick edits here and there.
I found the easiest way to understand what kak was about and how to do the basics was to read the "Why Kakoune?" Article on their site. Here is a link: kakoune.org/why-kakoune/why-kakoune.html
I use the Vim plugin in WebStorm / VsCode to have both a powerful IDE and a good text editor
So I don’t need some plugins, multitabs, etc. From my text editor
And I really love kakoune logic more than vim, but unfortunately there is no kakoune plugins for the IDEs (
I think developers should look in this direction too
Please review Helix, the editor that wad inspired by Kakoune.
love Helix
Does it have advanced features? Like jump lists, arglist , netrw etc
I tried Vim, Emacs, VSCode. The first had too wierd copy paste, and complicated extension ways. The second is a bit bloated and wierd customization too. The third is a bit slow on my computer and had visual noise.
Finally my favourite at the moment is a little-known editor called Howl. Classic editing (non modal) but clean. Unfortunately the community is too tiny but the software is pretty stable.
I will try Kakoune, I hope it is like a Vim done right.
I heard of this on /g/ a while back, I didn't give it much thought, weird to see it growing in popularity.
I thought everyone on /g/ used Emacs? Every time I've been to that board, there's an Emacs thread.
DistroTube Just because some people on /g/ make threads for something it doesn’t mean everyone there uses it. Those are just threads for people who use emacs I guess, I thought most /g/ users use vim to be honest.
If you want to find where most of the community discusses things: discuss.kakoune.com/
There's also the subreddit r/kakoune
You could try wily.
It is minimal, but still have a great integration to graphic and shell scrips or any programs.
It is comming from Plan9 OS, but adopted to Linux. And you NEED a three button mouse, as they are used to make chords.
It doesn't have a text mode though. But it IS minimal, the sources isnt large.
I think I mentioned this before Derek but you don't seem to have listened so I'm mentioning it again, a second attempt if you like... Your head is beautiful. 100% for the head. It has the shine, the texture and the wherewithall to carry that look off. Thumbs up for the head dude. But Derek. Your DNA is 100% GNU/Linux and you don't have a beard? What's with that? That head needs a beard. And not some sort of whispy chin fuzz. You need to make a concerted effort to grow some beard. OK? Believe me Derek. Growing a beard is the singular most important thing a GNU/Linux user can do. In fact, growing a beard is the single most important thing a real man can do. You are a real man right? A middle aged GNU/Linux user? So do it bro.. grow some beard.
“Kak” means “shit” in Dutch. Thats going to be an awkward writing in the terminal. Awesome as always DT
Kakka :-DDD t. Finland
Eric van der Woude in german that is Kacke.
Next time check out ACME, the editor that Rob Pyke uses.
Can it be used for programming?
Not allowed. The license states that only dirty limericks are allowed to be written in Kakoune. ;)
@@DistroTube
oh...
that's a good one...
😏👏👏👏
@@DistroTube this is not fair.
any text editor is usable for programming the question is wheter it makes sense workflow-wise
@distrotube Isn't it open source?
Awesome video, DT! Now please make a video on vis, another editor aiming to replace vim . ;-)
I'm a super text editor tester, not hopper, because I always end up with vim. Kakuone is weird, but well, it deserve a try
It is really making much more sence than vim...
Honestly i only used vim for 1 year... but still some things not making total sense... like $,0, ctrl r... etc.... many thing are wierd in vim.
And this editor getting it right...
I read Kakoune as Kakyoin
If you look at the manjaro-bspwm-community-edition, it ships with another nice standard editor: micro .
micro is the modern editor but no autocompletion and stuff
Kakyoin trapped by enemy STAND!
I used this for a while and liked it, but it didn't have a very large ecosystem so i switched to vim
It really reminds me of reverse Polish notation - once you get used to it, it's extremely expressive and intelligible. I guess the same is true for Kakoune.
In my job - programming web stores - we use reverse Polish notation to build & resolve sophisticated promotion system with a lot of conditions and effects. BTW. I'm Pole :-)
Have you ever tried out the Micro text editor? It's not nearly as powerful as editors like Vim, Emacs, and Kakoune, but it is a much better alternative to Nano with some more ability and extensibility. Although I don't use it as my main editor, when I'm just quickly opening config files it's very useful and intuitive.
I use VIM mostly but I did use Micro previously and loved it. I love how it is one tiny small file to place in your /usr/bin folder and you're good to go with it. Another feature that is nice about Micro is if you open a file without sudo rights and you go and try to save it, it will prompt you to use sudo rights to save it. Wish VIM did that. That is really nice.
@@riseabove3082 Yeah that's one of my favorite features that I forgot about. I hate editing a lot of a file in Vim and then having to do it again because I forgot to sudo lol.
Honest question: why would someone use something like this vs Libreoffice? I just don't get it.
LibreOffice is not appropriate for editing plain text files because of all the formatting it does. For programming and editing system files, you need to use a plain text editor.
@@DistroTube Ok, and a "dumb" text editor like TextEdit on a Mac won't do the job?
I just don't understand all the hype and effort people put into learning these editors. I'm not trying to be negative or a "smart ass", I just want to know more.
Thanks for replying =)
no matter how many times i try it or see someone use it, i can't stand this kakoune way of doing things. many of the keys just don't make sense and i find the vim "language" a lot more logical. i can literally "say" what i want to do as i'm doing it: "(d)elete (w)ord" / "(c)hange (i)n ( { )" "(d)elete (t)ill (x)"...
i'm happy that some people are finding this to be better for them, but it's def not better for me.
heck i'm even starting to question if i should go to the emacs way entirely and ditch evil mode. with the default emacs bindings i started really liking it.
The ones who have enough knowledge in VIm, they never consider to change it
I didn't get why the suggestion menus are so badly contrasted and unreadable.
I imagine they're configurable? It'd be kinda dumb if they weren't
@@timh.6872 It still is kinda dumb to be using those colors by default.
@@csbnikhil setting the color scheme to solarized-dark makes the ncurses_assistant text reverse-mode content (normal background as foreground and normal foreground as background). Not sure why it's using yellow as the default, though.
Where's that accent from?! Very Soothing
chicago area
Louisiana
While I usually choose "Chicago" as my "Time Zone" location when I do my Linux installations on camera...I'm actually about 13 hours away (if driving) in Louisiana.
Born on the Bayou
Now I need ekal-mode in Emacs.
I said a hip hop,
The hippie to the hippie
The hip hip a hop, and you don't stop, and swap it
Unless you’re amazing at calculating words, you’re using Vim wrong if you always count the words that you want to delete. Use d/word instead, which deletes until but not including the word after d/.
As someone who uses vim everyday and didn't know about this, thank you!
@@aylen7062 generally its better to use diw as dw can not delete the entire word if your not at the start of it
SOV? Like Latin? hmm
Noriaki Kakoune beats Emacs
Interesting editor. It’s logic close to mine one. But the name …, in my language it sounds like “pooper”, sorry for the word.
ахзахза Какун ))
как раз для моего говнокода
micro is the best terminal editor.
Micro don't have autocomplet, linter and snippets
there is in fact a "vimtutor" for kakune:
github.com/mawww/kakoune/blob/master/contrib/TRAMPOLINE
and theres a vim to kakune transition guide too:
github.com/mawww/kakoune/blob/master/VIMTOKAK
Honestly, being familiar with vim, it was just a matter of following the Clippy around. Yes, there's a Clippy, and he tells you what you can do with each command.