reddit / emacs
Does it worth to use Emacs keybindings instead of doom's predefined?
underconstructions · 2022-09-27 15:21
I've been using doom for the last 2 years, I never used a vanilla Emacs before. However I've
been trying recently to leave it for vanilla Emacs, and I'm disabling as much as possible
modules from it and write it again by my hand. I'm still using doom predefined keybindings
with the `SPC` prefix for now, does it worth it to disable it and learn the vanilla
keybindings? Like would it be faster?
p.s. I'm using evil if that matters
mickeyp · 2022-09-27 15:37
The vast majority of Emacs users not only use Emacs's key bindings, but like them. Like me.
If you already know one style (Vi), then you must ask yourself what you want to achieve by switching to Emacs's key bindings. Everything will gel better, for sure; but that may not be enough of a reason to switch. There's value in familiarity.
I do not think there is much difference between them, beyond personal preference, when measured over weeks or months of usage. All I know is that I easily reach my top typing speed when I program or write prose, and the only thing holding me back... is my brain's ability to synthesise the next thing I must type or do.
FitPandaFu · 2022-09-27 16:03
Emacs is really good a text editing and it will be more efficient than Evil at some text editing tasks while Evil will be more efficient at others. If you care about adding micro text editing efficiencies, there are many package for vanilla Emacs. IMO, the experience without Evil is just smoother if you plan to use it for a lot of stuff, a long time and hack on it.
ForkInBrain · 2022-09-27 16:24
[https://github.com/emacs-evil/evil](https://github.com/emacs-evil/evil) is very very good these days. If you use it and are comfortable I see no reason to change.
I don't think one or the other is significantly "faster" -- it is more a matter of preference. I have used Emacs vanilla, Emacs evil, and Vim, all for many year blocks of time. I don't feel like I was ever "more productive" in one or the other.
I boil it down this way: vim, and modal editing in general, is king in the terminal over a slower link. There, the modal editing lets you "type ahead" more certain that what you want to happen will actually happen. Emacs' non-modal editing is more of a problem over slow links because I find that I want the *visual* confirmation that the cursor/point moves to where I think it will before I do the next thing. Over a slow link that confirmation is delayed.
I initially switched to vim because Emacs made me use the Ctrl and Alt keys too much. I fixed that by getting a keyboard with Ctrl and Alt on my thumbs. VI bindings didn't really solve the problem anyway. They just made me hit the ESC key too much!
The problem I have with evil in Emacs is that it is another layer on top of vinalla Emacs. Not many packages are designed with evil key bindings in mind. You need packages like [https://github.com/emacs-evil/evil-collection](https://github.com/emacs-evil/evil-collection) and and [https://github.com/emacs-evil/evil-magit](https://github.com/emacs-evil/evil-magit) and [https://github.com/emacs-evil/evil-ediff](https://github.com/emacs-evil/evil-ediff) to make Emacs feel more "evil". Distros like Doom and Spacemacs integrate these packages for you, but then you're even farther away from the default Emacs experience.
I also find online help worse for evil bindings. To figure stuff out you often have to resort to looking at vim or neovim documentation. "Vanilla" Emacs is famously "self documenting" but last I checked evil couldn't provide useful help, within Emacs, in the same way, nearly as well.
To be fair, even Emacs is sometimes weak in the "self documenting" department as well, since it is gaining more and more modal and context sensitive features. E.g. org-mode is full of commands like this:
S-TAB org-shifttab
That is nice. Shift-TAB is bound to `org-shiftab` but Emacs online help doesn't tell me what `org-shiftab` actually does. This is because the Emacs key binding summaries are designed with an assumption that the command names are description enough.
Similarly, u/mickeyp just posted [this](https://www.reddit.com/r/emacs/comments/xpkmr2/comment/iq49xx4/?utm_source=share&utm_medium=web2x&context=3) about a newer feature that lets Emacs have small "modes" where keys do different things, but it isn't clear how you're supposed to discover these through Emacs' built in online help.
FluidDr1nker · 2022-09-27 16:24
One neat thing about Evil is that you can use your muscle memory in other programming environments like jetbrains, vscode and vim of course.
Extension_Try_6870 · 2022-09-27 16:24
Do you have any exemple where emacs editing is better than evil ? I'm an evil user and I'm wondering what I am missing.
ThockiestBoard · 2022-09-27 16:37
all of which have an emacs mode… just sayin
timmymayes · 2022-09-27 17:28
For me vanilla is where it is. I enjoy mod keys as they help me much more with the mental model of controls. If I ever get into modal editing it will be by creating my own modal system that I maybe use sparingly.
Couple of recommendations however:
1. Consider how you'll handle ctrl. Pinky pressing is not ideal. I use the edge of my hand as an extra finger dedicated to ctrl pressing. Other rebind capslock
2. Consider rebinding and using the windows key and app key to super and hyper ('s-' and 'H-' in emacs notation). I use these for extending a lot of built ins. For example I've extended ctrl-d, alt-d paradigm with H-d which deletes the entire line the point is currently on.
3. Lastly I've found when using modifier keys that thumb clusters are really helpful. Your thumbs are underutilized typically. I have a custom built dactyl manuform for this but the kinesis, moonlander and ergodox EZ are some solid prebuilt thumb cluster boards. They aren't cheap however.
The beauty of emacs is the flexibility for it's users to customize to exactly how they want it. Good luck with whichever way you decide to interface.
nv-elisp · 2022-09-27 17:48
> The vast majority of Emacs users not only use Emacs's key bindings, but like them. Like me.
How do you know this?
tangonov · 2022-09-27 18:03
I was gonna say that many Emacs newcomers are here because Evil was the thing that got their attention. This, and Doom has even managed to attract people who have never Vimmed to try modal editing in Emacs for the first time.
Vast majority must be at least a little exaggerated
Schievel1 · 2022-09-27 18:11
Why do you try to disable modules from doom and do things yourself to move towards vanilla emacs?
I switched from vanilla emacs to doom and doom is just amazing. It gives you all the features without much effort and it doesn't matter what, you can always change the default if you don't like it.
Idk why anyone would leave that for vanilla.
For key bindings, I moved from emacs keybindings to evil, because I think the heavy use of modifier keys in emacs inconvenient. Now I have a ergo keyboard where the modifiers are on the thumbs, but I don't want to switch back. Apart from that, doom binds are very thought out and fit the vi scheme nearly everywhere.
-w1n5t0n · 2022-09-27 18:31
I would suggest you seriously consider the "Emacs pinky" phenomenon, which is very real and has made my RSI worse.
The question of whether it'll be faster depends on whether you see a speed difference between having to type `C-c c` and `SPC c c` . To me, pressing SPC with my thumb (which is the strongest finger and already hanging over the space bar) is a lot more comfortable than having to rotate my wrist so that my pinky can move down to Ctrl. I've even remapped Caps to be Esc when tapped and Ctrl when held down, but that only helps improve things a little bit. With leader-key setups, you can choose between tap-release-tap or press-press-release both, so not only are you using a stronger finger but you don't have to be as accurate in regards to whether the first key was already released when the second was pressed etc.
TL;DR having to press Ctrl all the time can be really bad for your hands over time and lead to (or worsen) RSI, which is no joke for anyone who makes a living by typing stuff.
When it comes to the actual bindings themselves, I find them pretty well thought out for the most part and I would certainly use them as a starting point for tweaking my own.
FluidDr1nker · 2022-09-27 18:32
I tried, they all suck.
ThockiestBoard · 2022-09-27 18:36
im so do the vim ones if you want just about anything more than modal editing
tcmart14 · 2022-09-27 18:46
Use whatever your comfortable with. For me, it is the emacs keybindings. I just like 'em, never been a huge fan of modal. But to each their own. What I would recommend is to try it and form your opinion. You may like it, you may not? You only know for sure if you try. And if you don't like it, what did you loose? Maybe 10 minutes of frustration? What did you gain? Perhaps a new found perspective as to why you like modal more?
[deleted] · 2022-09-27 18:48
[deleted]
tcmart14 · 2022-09-27 18:48
You raised a good point with remapping keys. I forget that I have done this. I don't mind using the pinky for control on most keyboards, but the meta key is usually the annoying one. I do remap my left Caps lock key to meta on all my systems, so it isn't even emacs specific.
paretoOptimalDev · 2022-09-27 18:54
I used to use vim/evil but decided to switch to vanilla because of various integration papercuts that evil-collection almost solved.
*After* getting a keyboard with control on the thumb cluster I'm fine with vanilla, but sometimes miss being able to make certain quick changes.
I feel less mental fatigue without the modal layer, then again the 8-10 years of vim coincided with higher stress.
I'll probably try evil again someday to check if i'm missing anything.
TunaCowboy · 2022-09-27 19:57
The same can be said of the defaults and anything with `readline` bindings.
TunaCowboy · 2022-09-27 20:02
If you use your pinky for `C` with a qwerty layout you're doing it wrong, using the side of your palm (5th metacarpal) is intended.
easyEggplant · 2022-09-27 20:08
Don’t rebind anything to Super or hyper if you’re on Ubuntu. They conflict with tons of stuff and require xmodmap fun.
Also I think they don’t play well with qmk, but I could be wrong there. I know that qmk has a “meh” key, but that’s just c and s at the same time.
ottersinabox · 2022-09-27 20:25
I don't think it matters. Just do what you feel most comfortable with and try to expand your usage of the features. Doom is a nice set of defaults. I wouldn't say vanilla is more "correct" in any way.
timmymayes · 2022-09-27 20:34
I did the xmodmap stuff. QMK has a hyper key of some sort but it doesn't work same for super. I use windows and app key with an xmodmap rebind. I also had to do some other key droppy stuff.
I only use emacs, command line and chrome so I don't need all the other features. But you bring up a good point.
easyEggplant · 2022-09-27 20:47
I'm in the process of trying to unlearn all my hyper and super mapping, and replace it with vanilla bindings (example: I used to have `H-p` mapped to projectile-open-project because I used it so often, but `C-p p` is the regular version so I'm moving over to that).
The other thing that I get (besides having to wrestle with .xinitrc files) is bindings that will work over a remote connection.
That said, I'm sure that I didn't bind hyper the right way, so YMMV OP :)
-w1n5t0n · 2022-09-27 21:16
Intended by whom exactly? The 19th century inventor of the QWERTY layout?
I have been researching and documenting keyboards, their history, and keyboard-related ergonomics over the last year for my PhD and I have never, *ever*, seen or heard of or read about anyone, *ever*, using the side of their palm to press the Control key.
I'm not saying there isn't at least one person who does this, I'm saying it's by no means the "intended" way - if there even is such a thing, considering that QWERTY is over 250 years old and was intended for a very different use case.
I don't know what keyboard you're using, but with every standard QWERTY keyboard that I can find in my office right now (it's 4), pressing the Control key with the side of my palm ranges from very uncomfortable (since my wrist has to tilt on both vertical and horizontal axes so that my palm can reach the keys, which would in turn require the other fingers to stretch even further to complete the chord), to just plain impossible on low-profile keycaps (like all laptops).
Do you have any resources to point me to? Can you demonstrate how you do it with pictures or a video? I'm curious but I'm certainly not convinced.
timmymayes · 2022-09-27 21:34
I may run into remote connection binding issues, that I can't be sure on yet.
Yeah I'm using Hyper with \[({ and \])} to do some different character searches. I also use H-t for timers so like H-t-t to start timer, H-t-x to stop one etc. H-d to delete line under point, s-d to duplicate line upto point etc.
Honestly I've mostly been using it sparingly as I'm focused on learning existing keys and am slowly adding things as I want to fully understand modes and commands before extending too much. aka trying to lay the solid foundation.
I started learning emacs and full stack web dev last april alongside a full time marketing job, live in relationship and working with a partner to design/develop/kickstart a board game so I'm not really very deep in the rabbit hole yet.
FluidDr1nker · 2022-09-27 21:37
Don't know, the vscode and jetbrains ones are pretty decent, they even support stuff evil still doesn't have, a recent one from the top of my head: ` :s/\%Vfoo/bar`
FluidDr1nker · 2022-09-27 21:40
readline bindings are trivial to learn, most vimmers know them
easyEggplant · 2022-09-27 21:47
> I started learning emacs and full stack web dev last april alongside a full time marketing job
Wow, that's a lot to bite off! If you gravitate towards front end you might not ever care about remote, like ever.
> and working with a partner to design/develop/kickstart a board game
I had to re-read your comment to make sure I didn't know you. I don't *think* that I know you. Regardless, good luck!
timmymayes · 2022-09-27 21:55
Yeah, gotta get after it. Thanks for the luck! I honestly will probably go into back end more likely. Who knows. The goal for now is to get a job doing programming during the day so that I can be paid to learn on the job as well. Then I'll re-assess and figure out where I want to adjust to.
Lucaskek · 2022-09-27 22:06
If you are used to vim bindings i highly recomend using dooms bindings cause it has a lot of non packaged code that makes bindings very concise and convenient and i even consider going back from my normal config sometimes
Lucaskek · 2022-09-27 22:11
Yeah emacsers are too crazy about how heavy doom is
Doom is really well done and you can always disable a ton of stuff and make it a very raw emacs experience
Schievel1 · 2022-09-27 22:17
Plus it may be heave but it's booting incredibly fast
easyEggplant · 2022-09-27 23:28
If you have any backend/programming questions, feel free to dm me some time; good luck!
MistakeNotDotDotDot · 2022-09-27 23:52
To operate on the entire buffer, `C-x h [something]` is faster than `gg[something]G` and doesn't mess with point.
TheRealDarkArc · 2022-09-28 01:31
You're getting down voted but I now use a ZSA moonlander to help mitigate persistent numbness/cubital tunnel syndrome that developed in my left hand and mostly affects my pinky.
Maybe that would've happened anyways, but years of Emacs + playing games with "hold to spring" and "hold to crouch" (+ naturally scrawny fingers) has left me with "ctrl is now on my thumb" and "toggle to spring" and "toggle to crouch" in all games.
At the very least, OP should be careful, take more breaks than I (and probably you) did, and I'd also suggest a caps lock -> ctrl rebind if OP is convinced to try out native bindings (I found the caps lock position much less straining, but that was ultimately "too late").
thetemp_ · 2022-09-28 03:48
If you are going to use Emacs, knowing Emacs's keybindings will help you out in a lot of ways, even if you use Evil most of the time.
One way to do this is by enabling Emacs keys in insert mode and just using them. I believe there is a setting for this in Evil, but it's been a while since I looked.
If you keep using Doom, be aware that there are more features and pre-defined menu items when you have ":editor evil" enabled (don't hold me to that, it's been a while and could have changed by now). But if you use Evil's insert-mode with Emacs keys, you can have both at the same time.
timmymayes · 2022-09-28 05:06
Thanks! I'll mark a note in my system!
FreeAd7233 · 2022-09-28 07:38
Emacs’s keybindings wouldn’t be better than vim’s one. Nor vice versa. It’s just about personal’s taste. Both of them have history more than 30 years, and will be continually long survived bindings. So I will not agree with your opinion that everything will be better if one try to learn eMacs bindings.
FreeAd7233 · 2022-09-28 07:43
Yes, xxx-dwim and org-shifttab, org-ctrl-c-ctrl-c style’s command are something dreadful.
FreeAd7233 · 2022-09-28 07:48
Doomemacs doesn’t alternate any of the major mode’s bindings, because doom doesn’t touch C-c at all.
So for text editing and your customized global bindings, use evil, for major mode specific keybindings, just use emac’s styles C-c C-whatever.
For some read-only buffer in which doesn’t have good evil integration (just suppose dired without evil-collection), then just Use emacs’s mode (C-z to switch, and you can also configure those mode to be default in emacs state) in those buffer, I am just okay with the currently scenario.
I think only knowing basic emacs bindings, covered by the builtin tutorial would be just fine. They are enough to make you easily switch between window/buffer with emacs state to back to buffers/windows with evil state.
FreeAd7233 · 2022-09-28 07:56
I agree with you.
Doomemacs implements some it’s own fold functions for org mode, and binded with zm, zr, za etc stuff (they are just vim style folding keybindings), and they are so naturally corresponding to What the counterpart in vim would do and so integrated with vim style bindings.
Before I use the describe-key for those keys, I never know those fold functions for org are implemented by doom, I was just thinking they are implemented by evil-org or evil-collections.
SlowValue · 2022-09-28 11:11
I guess from the [Emacs Survey 2020](https://emacssurvey.org/2020/).
nv-elisp · 2022-09-28 15:39
The only thing that survey shows is that it's hard to conduct a good survey.
nnreddit-user · 2022-09-28 16:17
Speaking as one of them, unemployable emacs devs are renowned for their impulse to question the unsubstantiated claims of others (these bindings are preferred, survey is junk, etc.), but never their own.
It's common knowledge that representative sampling is practically difficult, but some data is always better than none, and that dude did the community a solid. A shame he didn't do it annually.
nv-elisp · 2022-09-28 16:30
> some data is always better than none
Depends on the data and how it's collected.
It also needs to be considered when drawing conclusions. I wouldn't draw much from that survey even if the effort is appreciated.
nnreddit-user · 2022-09-28 17:30
> Depends on the data and how it's collected
One vacuously true remark deserves another, and pretty soon we can replicate emacs-devel on r/emacs.
nv-elisp · 2022-09-28 17:41
lol I'll give you that you're always entertaining