 I've been getting some questions about Emacs here in the last few weeks. So of course I've made a lot of videos about Emacs in the last three or four years, especially about Doom Emacs, which is a distribution of Emacs that comes pre-installed with the Evil Keybindings. And of course the Evil Keybindings, those are the Vim Keybindings. That way you don't have to learn the Vanilla GNU Emacs Keybindings. If you already know Vim, then you would be right at home in Emacs with the Evil Keybindings. You know, some of you guys have been asking me, especially if you're switching to Emacs, you've never used Emacs before, some of you guys are asking, should you learn the standard GNU Emacs Keybindings, the Vanilla Keybindings, or should you just go ahead and start with Evil? Some of you guys have even phrased it this way, is learning the Evil Keybindings actually wrong. Is that the wrong way to use Emacs? And you know, this is a deep topic, so this is gonna be a little bit of a rant, but one of the things I do want to say is, Emacs is a different kind of program than most of the other software you use on your computer as far as it's extremely customizable, extensible. It's essentially an Emacs Lisp environment where you program something in Emacs Lisp and you make it into whatever you want. And because of that, you can never say, is it wrong to do something in Emacs? Is it wrong to use this program in Emacs? Is it wrong to do that program in Emacs? You know, if you want to use the Evil Keybindings, it's not wrong, but you don't want to use it. It's not wrong. It's basically you create Emacs into whatever you want it to be. So I don't like people that phrase it that way, and I know there's a lot of discussions on the internet and you see it in forums and chat rooms and things like that, especially from the old school GNU neckbeards that have been using Vanilla Emacs for 30, 40 years. Some of those guys will actually tell people that it's wrong to use the Evil Keybindings. Like it goes against the Emacs way. You're not doing Emacs the right way, the Emacs way. And of course the Emacs way is you can do whatever you want with Emacs. That's the Emacs way, right? It is to turn that thing into whatever the hell you want it to be. One of the unfortunate things with software is that you have a lot of gatekeepers out there. All software, whether it be Vim or GNU slash Linux distributions or whatever it happens to be. You have sometimes you have these gatekeepers that try to tell people exactly how they should be using their software and or they try to steer people in a certain direction for their software choices. And you have some of this gatekeeping. It's not rampant in the Emacs community, but you do see some of these people out there that'll tell you that installing Evil, you know, it's basically you're bastardizing your Emacs and you're making this Franken editor, right? This Frankenstein's monster of a text editor because now you're trying to have Vim and Emacs at the same time. And they basically tell you that you're doing it the wrong way. You should just install vanilla, you know, GNU, Emacs, learn the default key bindings and that if you're coming from Vim, you just got to switch to the standard GNU, Emacs key bindings, switch cold turkey, forget everything you knew about Vim. Unless you're using Vim, if you want to use Vim and Emacs at the same time, they'll tell you use the Vim key bindings when you use Vim because that's what the Vim key bindings are for, for Vim and use the standard GNU, Emacs key bindings when you use Emacs because that's, you know, that's, that's the way it's supposed to be. There are even people, I've heard people say that you should always basically use the defaults for every program, right? If you have to do some serious customization to a program, then something is either wrong with the program or you're just doing things the wrong way. And I don't agree with any of that at all. Again, the whole point of really extensible pieces of software. And when you're talking about ultimate extensibility, certainly Emacs fits into that category, right? And so does Vim for that matter. You don't have to use the standard Vim key bindings in Vim. If you don't want, you can remap all the key bindings to, to whatever the hell you want. And that's the point of this thing is you can do literally what you want to do with your software. I find it especially odd when people tell me I should be using something that comes default, a default setting or something and something like Emacs, because the whole point of Emacs being customizable, it's almost become a meme. There's a old Emacs joke that 90% of Emacs users have strange customizations in their config files. And the joke is that the other 10% have really strange customizations in their config files, right? The whole point of Emacs is that customization. So as far as you switching to Emacs, you're learning Emacs, your brand new Emacs user, and you want to learn the keybindings. Should you install Evil and learn the Evil key bindings or should you learn the default GNU Emacs key bindings? I'm going to give you a little bit of a personal opinion on some of this stuff, but I do think it is subjective. Everyone's opinion on this will be different. Everybody's use case will be a little different as well. But I'll give you some food for thought here. Let me switch over to my desktop. Let me go ahead. I'm going to launch Emacs here. So let me give you some pros and cons to Evil. So one of the things with learning the Evil key bindings is do you already know the Evil key bindings? Because let me open a terminal. Do you know VIM? So let me just open something here in VIM. If you know VIM, you know, the HJKL and all the various VIM keys and everything that's associated with VIM. You know, if you know all of the standard VIM text editing modes and commands, then you know those commands in Evil mode inside Emacs. So that really speeds up the learning process instead of having to learn everything being brand new, at least with the text editing portion of Emacs. You've got that covered if you already knew the VIM bindings. Now, if you didn't already know the VIM bindings, would it make sense to use Evil mode in Emacs? Well, I would argue that it could be because, honestly, if you learn Evil mode in Emacs, then you also, at the same time, also learned the VIM bindings. So you kind of learn two really extensible text editors, basically at the same time, because Evil mode in Emacs is essentially all of the VIM text editing commands as well. Now, I do want to give you the flip side of all these scenarios as well. So I will say that learning the Evil key bindings and not learning the default GNU Emacs key bindings, I think is a negative. I do think you should be familiar at least with some of the basic GNU Emacs key bindings, just in case you have to use them. And sometimes you will have to use them. For example, if I put my cursor here at the end of a line here, if I wanted to, I could jump to the beginning of this line using the standard GNU Emacs key binding, which of course is control A, takes me to the beginning of the line. Of course, I could have also just done that with the standard VIM binding, right, one of the Evil key bindings. I could just hit zero on the keyboard to do the same thing. So, you know, it's good to know both sets of key bindings. I think in an ideal situation, that's probably where you want to be at. You would like to be at least reasonably comfortable with both the Evil key bindings and the standard GNU Emacs key bindings to where if you had to use either one, you could. And another advantage, if you know the GNU Emacs key bindings, is that those key bindings are used in other pieces of GNU's software. Many of the GNU programs use Emacs style key bindings. For example, GNU Bash or the read line function inside the shell. Let me go ahead and switch back over to the desktop. Let me open a terminal. Let me switch over to the Bash shell here. Now, I use VIM key bindings inside the Bash shell. So I'm actually going to switch over to using the default Emacs key bindings, which is what most people are going to have in their shell anyway. So if I type, you know, this is a line of text, which is completely misspelled, right? Control A would take me to the beginning of the line and control E would take me to the end of the line. Control B would take me back, right? I just go back, Control F would go forward, etc. So again, that's one advantage of knowing both sets of key bindings, right? I do think it's important to kind of know a little bit of the GNU key bindings even if you're going to use Evil mode. Now, which set of key bindings should you default to Evil or the default GNU Emacs key bindings? It will depend. Like when you're text editing, a lot of it depends on, do you like modal text editing like in VIM? VIM has modes, right? You have insert mode, normal mode, visual mode, meaning you're always in a different mode. The keys that you press will do different things, depending on which mode you're in. I kind of like that approach. I think it makes a lot more sense. And because you have the different modes in VIM, it also makes the key bindings themselves a lot shorter, a lot easier to remember where an Emacs, because you don't have these separate modes, the key bindings are a lot more complicated. They're actually key cords. Some of the key cords are quite lengthy, where you do, you know, control X, control S, for example, to save. You know, that's not necessarily that difficult. But how about just a colon W to write in VIM, right? That's a good example, right? It's twice as many keystrokes to do the same thing in Emacs as in VIM. And that's not an arbitrary example. In many cases, that's kind of how it is as far as some of the differences between your standard key bindings and VIM as opposed to the key cords that you have to use using those standard GNU Emacs key bindings. Another thing to consider is what kind of keyboard are you using? What kind of keyboard layout are you using? Are you using QWERTY? If you are the VIM key bindings, the EVIL key bindings, they're going to work just great. They work lovely, right? HJKL is all right there, kind of on the home row on a QWERTY keyboard. But what if you're using a non-QWERTY layout, especially if you're using, you know, some of the stranger layouts where HJKL and all of that stuff is all moved all over the keyboard. So if you're using things like Colmack and Dvorak, you're probably not going to find the EVIL key bindings as enjoyable as what a QWERTY user would find them. And since we're mentioning keyboards, we should mention strain, strain on your hands, repetitive stress, injury, RSI. We should mention Emacs, Pinky. These are real world issues that the GNU Emacs key bindings, they are known to hurt people's hands. And I have some personal experience with this when I first switched to Emacs for the first month or so. I use strictly the GNU Emacs key bindings because I wanted to learn them. I wanted them, you know, even though I knew I'd switch to EVIL, I wanted to learn those default Emacs key bindings. And because it involves so much of me reaching with my pinkies to hit those control keys, because so many things you do in Emacs involves control in another key, control in another key or key chords, control X, control S, control X, control L, control X, control C, whatever it happens to be. You're constantly reaching with those pinkies to control. My hands had some serious pain after a month. I'm not even lying. My hands hurt. And when I switched from the GNU Emacs key bindings to the EVIL key bindings, that hand pain went away and that's not just a me problem. Other people have that problem. Now, there's plenty of people that use Emacs with the standard default key bindings and they don't have those kinds of pains, wrist pain and hand pain, pinky pain, right? They don't have that strain. A lot of it, how big are your hands? My hands are small. Some people have bigger hands. What kind of keyboard are you using? For example, a lot of the keyboards I use now, I probably be better off with than I was a few years ago when I first tried Emacs, for example, if I was using something like this plank keyboard, that's the easy plank from CSA, right? That's a 40 key keyboard where the control key, there's actually not control keys on it, the Z key, the Z key and the slash key in the bottom corners, double as Z and slash. Or if you hold them, they can be the control key. And because the control keys on that keyboard will be much closer than they will be on a regular keyboard, I wouldn't have to stretch as much. So I'd probably be fine on a really small form factor keyboard. Also my easy ErgoDocs keyboard, my Moonlander keyboard from ZSA, those have the same issues as far as the control keys are actually a little closer in than they would be on a standard like 110 keyboard. So that might be a little better. But it's still, even though it's closer in, I don't like constantly reaching with pinkies to hit those control keys. I do think that's a problem with those default key bindings. But again, don't just take my word for it like that's going to be the case with you. You should actually use those key bindings for a little while and see if they work for you. Now, if you start experiencing some pain, then I would strongly urge you stop using those key bindings, right? Because you don't want to be in a situation where you do long term damage to your hands because it could eventually get to the point where you'd have to have surgery when you may even affect your work, especially if you do a lot of typing professionally. So just pay attention to that. Now, to be fair, because I know some Emacs guys that use the standard GNU Emacs key bindings will say this in the comments. You can remap the control key. You don't have to keep the control key on the same place on the keyboard. Most Emacs users, if you're using the GNU Emacs key bindings, what you're going to do is you're going to remap usually the cap slot key to control because that's a little easier to reach to. And it causes a little less hand strain, especially on that left hand. And that's a good advice. Actually, I would strongly recommend everyone that uses the default GNU Emacs key bindings to do that. Now, one small little victory I will mention for the evil key bindings is the evil key bindings in no way will conflict with your CUA key bindings, the CUA key bindings. That's your common user access key bindings. What those are is those are the standard key bindings that have been around for decades. That's so many programs default to, for example, control X to cut, control V to paste, control Z to undo. Those, those kinds of things, because VIM has modes, evil has modes, because you have those modes that really doesn't affect those kinds of CUA bindings where Emacs has a ton of conflicts with those bindings because Emacs involves the control key and all of those CUA bindings also involve the control key. So you can't really use them in conjunction with the default Emacs key bindings. And the last point I want to make is, you know, which one you choose will depend on preferences as far as VIM and Emacs use different functions to do the same thing. And that's the same thing with evil in Emacs, right? Because it'll basically be the same kind of thing where, for example, let me open up something, I'm going to open up my doomconfig.org. And here is a perfect example because I'm here at the end of my config.org. Let me zoom out a little bit so this table isn't so wonky. Now in VIM or with the evil key bindings, how would you delete all the characters up until the next instance of a character? Well, if you've been using VIM for a while, you know, D is delete, T is two. And then the next key is the next key to stop. For example, I'm on command here. If I do DTD, I'm going to delete everything until the next instance of D. Did you see how that worked? I'm on command. I'm going to delete everything to the D using the standard VIM or evil key bindings, DTD, U to undo. Now the way this would work in Emacs is Emacs actually has a program built into it, a Zap to character, right? And this will, I'm not exactly sure what the default can do. Emacs key bindings. But in Doom Emacs, I have them binded to space Z and then the character. So space ZD deletes all the characters to that character, but it also deletes the character itself as well. So slightly different key binding, also slightly different functionality. One stopped at the character, one actually deleted the character and then stopped. Another interesting example would be how do you delete everything inside parentheses or inside quotations inside VIM? Well, you would do DI for delete inside and then the character. I'll do a single quotes. I just deleted everything that was inside that pair of single quotes, U to undo. Once again, DI single quotes, U to undo. Now, as far as I know of, there is no way to do that with the standard GNU Emacs key bindings. There is a package, a program that can do this. It's called expand region. I don't think expand region is set to a key binding out of the box. If I do a meta X, so alt X, and I search for the expand region package. Yeah, there it is. If I hit enter, you can see it's going to expand the region. Although in this case, it expanded it from the single quote to the dash. I think the dash is probably giving us a problem there. Let's do space here inside the single quotes. So do meta X and then expand region. And now it expands region from here to here. So it actually, it includes the quotes, so it doesn't do inside the quotes. But what I would probably do if I was using Emacs is I would probably bind the expand region command to some key binding, because I do think that's very useful because I use that DI, the delete inside parentheses, delete inside quotations command in VIM all the time. And because I use evil bindings, that's also available to me in Emacs as well. So again, just Emacs and VIM, they do all of the same stuff, but a little differently, right? They do things slightly differently. So that's just a little food for thought as far as, you know, should you learn the evil key bindings? Should you learn the default Emacs key bindings? For me, I would suggest being comfortable in both. I do think even if you do use standard GNU Emacs, you're probably going to eventually find yourself needing to use VI or VIM at some point. So it's not a bad idea to learn the evil key bindings. And even if you are a VIM user going to Emacs and you're going to use a distribution like DOOM that uses the evil key bindings, which will make your transition a lot easier. It's a good idea to at least know some of the standard GNU Emacs key bindings, because there's going to be gaps in coverage. There's going to be some things that won't have an evil key binding to them. All they have is the standard GNU Emacs key binding. For example, and let's just do a four instance here. Here inside DOOM Emacs space period runs the find file command. But say I was inside some mode that for whatever reason, the key binding is all jacked up, space period doesn't open, find file. Well, I could always do meta X to find file. But if I know the standard GNU Emacs key binding to find file, I could just use it, control X, control F, finds file. So that's just one example. Right now, again, there's going to be some gaps in coverage. Evil mode is a pretty good collection of things. There's also a secondary package called Evil Collection, which expands the coverage of the evil key bindings, even more to include things like Enderid and Maggot and things like that. But you're going to still find things inside Emacs. There's going to be certain packages that you will install where they don't have evil key bindings available at all. So you're going to have to know a little bit of those GNU Emacs bindings just as a backup plan. Ultimately, you make Emacs into whatever you want it to be. So I would suggest just experiment, just see what works for you. And, you know, keep what works for you, throw away what doesn't. Now, before I go, I need to thank a few special people. I need to thank the producers of this episode. Gabe James Maxim met and I met Mitchell Paul, Royal West, Armored Dragon, Bashed Potato, Chuck, Commander Henry, George Lee, Methos, Nate, Erion, Paul, Peace, Watch, and Fidora, Polytech, Realities, For Less, Rick Profit, Roland, Tools Devler and Willie. These guys, they're my highest tiered patrons. Over on Patreon with these guys. This ran about evil key bindings versus the default Emacs key bindings. It wouldn't have been possible. The show is also brought to you by each and every one of these. Fine, ladies and gentlemen. All these names you're seeing on the screen right now. These are all my supporters over on Patreon because I don't have any corporate sponsors. I'm sponsored by you guys, the community. If you like my work, I want to see more videos about Linux and for an open source software like Emacs and Vium. Subscribe to DistroTube over on Patreon. Peace. The absolute worst key bindings are nanos. I can never remember those things.