reddit / emacs
Worth to learn the emacs way of keymaps?
nSeagull · 2022-10-10 09:52
## Update: So I've been going hard in using the emacs keybindings for these last three days. Even though my homerow is rebound to modifier keys, the act of chording is bringing back some RSI pains from 6 years ago.
Again, this is my personal thing and how my body works, not saying any is superior to another. I was taking a look at the `meow` package some folks recommended, and while it introduces a modal editing way based on the emacs original keymap. I think I'm going to skip it and just use evil.
If you're here reading this because you're considering which one to use, I'd say: Try them yourself for a week, investing in getting your workflow going and see for yourself. In my case I prefer to be impure rather than having a pain on my wrists :)
---
I do [grok Vi(m)](https://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118). Used Emacs mostly for coding and org. I've been using Spacemacs for a couple of years, switched to Doom, used it for 2 years too. Lately due to work stuff, I've been using VSCode (not gonna get into details with this)
Everywhere I edit text, I'd use the Vim keymap, it is already an extension of my mind in some way and I feel crampled when working without it.
Lately, I've started building my Emacs config from scratch, to abstract myself from the computer I'm using and start gravitating towards using Emacs more as an OS rather than a code editor.
I've been avoiding to use evil-mode and friends for two reasons:
1. I'd need to configure all the unimaginable keybindings to work properly with other packages (I'm aware of evil-collection though)
2. I feel like the Emacs keybindings are designed like that in some way and that the part of the community that doesn't use evil works in the same level of efficiency or better due to tighter integration between packages.
My question would be:
Is it worth the effort I'm taking to learn the Emacs keybindings, or is it just "a different way of doing the same things"?
S_Nathan · 2022-10-10 10:01
I used vim for several years, then vanilla Emacs for several years. I’ve become a very happy Spacemacs user and can thoroughly recommend it. Most of the keybindings are already taken care of. Two exceptions do bother me though: mu4e and info-mode.
I can’t comment on how well Emacs can be used without learning Emacs’ native keybindings, as I already knew both vim and Emacs bindings when I started using Spacemacs.
summeremacs · 2022-10-10 10:04
I'd say check out meow. It's like vim keys but less conflict-y with emacs and really easy and powerful: [https://github.com/meow-edit/meow](https://github.com/meow-edit/meow)
Domva · 2022-10-10 10:07
I'm using evil eith evil-collection. It's the same for me - vim key bindings are an extension of the mind now. I've also been using emacs key bindings where vim is unavailable. Knowing both is awesome, because your not at a loss when vim doesn't work in some obscure emacs buffer. Also, a few emacs bindings work in the terminal and browser search bar (on mac at least), so that comes in handy
lj-read-it · 2022-10-10 10:21
I'm in the same boat, mostly Vim keys and they work really well across packages with evil-collection, occasional fallback to Emacs keybindings (which I know very minimally) in the small patches not covered by evil-collection, like C-y to paste into a minibuffer. That last use-case pretty much disappeared when I learned to use edit buffer in Dired, though.
oni_strech · 2022-10-10 10:25
I’m totally with OP on learning Emacs-way of key bindings. They also work in terminals, Browsers and even to some extent in VScode.
I’m not a hater of Vi(m), but all of this evil things it’s like riding a Porsche with interior of Chevy, no thanks!
JayTheBookFan · 2022-10-10 10:47
It takes about a month to build muscle memory for a new editor. The first week is hell. Then it quickly becomes easier. If you plan on staying in EMacs - picking up the standard EMacs key bindings is the way to go.
aqua0210 · 2022-10-10 13:13
It worth.
I have been using emacs keybindings for three years. I only use vim when I need to edit some configuration file in terminal if emacs is not available.
With emacs keybindings, I can get these benefits:
1. No need to switch from insert mode to normal mode( use palm to press Ctrl, with mechanical keyboard)
2. No need to touch ESC key
3. It is easy to simulate emacs keybinding system wide( macOS use `karabiner`, Windows use `AHK`, Linux use `xkeysnail` )
shared:
1. [AHK configuration](https://github.com/Eason0210/emacs.ahk)
2. [karabiner configuration](https://github.com/Eason0210/karabiner-config)
3. [xkesnail configuration](https://github.com/Eason0210/xkeysnail)
nothisisme · 2022-10-10 13:29
> like C-y to paste into a minibuffer.
You might like `(setq evil-want-minibuffer t)`
WallyMetropolis · 2022-10-10 13:36
I guess the only way to find out what works better for you is to try it both ways. Others may operate differently, but my Emacs journey has been basically a decade and some change of lots of trial and error. No need to spend a lot of time hand-wringing about eglot vs lsp-mode, I just tried both and will probably switch again at some point to see what's changed.
Give it a whirl, see how it feels. No harm in it, I think. Worst case is you end up back as an evil user with high confidence that it's right for you and the ability to work with packages that don't have good evil support.
thiscarhasfourtires · 2022-10-10 13:43
I use Emacs keybindings on insert mode and also on the external terminal. They're very ubiquitous keybindings and there's really no downside to becoming familiar with them. I wouldn't use them for everything because they are hard on my fingers. I'm a Doom Emacs user and it works for me, it's like `evil-collection` but curated and configured to make more sense as a whole, and there are also many Doom specific settings.
lj-read-it · 2022-10-10 13:47
Ooh, I had no idea thanks! I really need to look into and implement some Evil settings, I've been meaning to do visual line mode forever.
SteamingBeer · 2022-10-10 14:13
## I have been using vim **everywhere**:
- Browser -> Vimium
- Emacs -> evil mode
- Tiling -> vim keybindings
- Terminal vi keybinings and also using vim sometimes there
## Reasons why I choose vim keybindings over emacs:
- They are universal (other editors have half assed or pretty good modes) thus migrating to another editor, let's say for work, should be painless
- Modal editing makes sense to me, personally
For vanilla configuration, I would say I prefer **doom** as it has a lot of sane defaults and its keybindings are mnemonic so they make sense to me. They make it easy to get started and its easy to modify to fit your workflow, rather than spending time reinventing the wheel. Personalization can come afterwards to make emacs really an extension of your mind.
But yes all in all, muscle memory is the best efficiency tool. So I would stick with evil mode.
lambda_abstraction · 2022-10-10 14:39
I tend to think that often the non-emacs installed platform can be accessed via tramp or sshfs, so you can use a *good* editor anyhow. Even on my Linux recovery images, I have mg (could have been zile), and I have that available as root's editor on normal workstations. I don't run emacs as root; there's just too much code for me to have complete trust. I learned the keys with Perfect Writer on CP/M back when dinosaurs roamed the earth, and my mind just doesn't get the modal editing thang.
*edit: remove some redundancy*
lambda_abstraction · 2022-10-10 14:42
I'd consider giving it an honest try. You'll either grow to like it, or you can return to modal editing if you don't. I don't have a dog in this fight, but I'm just more used to Emacs keys from experience.
rustyrush · 2022-10-10 15:05
Sorry for hijacking, do you know of any work to replace the change surrounding symbol functionality on meow from evil? So cs([ to change deepest surrounding parens to square brackets.
[deleted] · 2022-10-10 15:27
[deleted]
No_Statistician_9040 · 2022-10-10 15:34
Evil and evil collection with undo-fu
summeremacs · 2022-10-10 16:02
Unfortunately, I'm not a coder at all. I use emacs for org mode, email, org capture from safari, note taking etc... I honestly am not the person to ask. In fact, if you go to the Meow discussions page on GitHub, I was the one asking lots of questions (you'll see my name there in a number of posts I started). 🙃 But they did answer me so you should ask on there because they were super helpful about it all.
summeremacs · 2022-10-10 16:03
See my reply to rusty rush above 🙃
das-not-so-bad · 2022-10-10 16:03
I'm a vim/evil user myself that switched to the default bindings. I say yes, learn the emacs bindings. It's more sane than you think despite what others are saying.
I did make my caps lock and return key act as ctrl keys when held pressed to help avoid strain on my pinkys.
thoomfish · 2022-10-10 16:04
I'm in the process of learning meow and this is definitely something I'm missing. The other thing is "." for repeating a command without going through the whole rigamarole of defining a macro or the cognitive load of remembering how beacon state works (which, tbh, I still don't fully grok after reading documentation).
rustyrush · 2022-10-10 16:06
I think ‘ (single quote) is what you are looking for for repeating commands. I’m just lacking some fluency in moving around, since I used to rely a lot on paragraph backwards when moving locally in a region , I guess meow is more reliant on searches and symbol matches :D
timmymayes · 2022-10-10 16:12
Comment so I can look at this configs when I have time.
Salute fellow palm presser. This is the way.
timmymayes · 2022-10-10 16:13
I prefer them. I also went through the effort to setup hyper and super keys (I use a keyboard with thumb clusters so I had extra keys under strong typing digit. )
thoomfish · 2022-10-10 16:19
The problem is that only repeats the last individual key, which is not that much more useful than just hitting that key again, given that all of meow's normal bindings are just single keys (and weirdly, if I try to bind something like "C-l" in normal state, it both doesn't work and randomly fucks up some other binding).
Most useful-to-repeat commands are composed of one or more motions *and* an action, and the good thing about vim's `.` was how it bundled them together.
So for example I could do `ci"<text><ESC>` to change the contents of a quote to something else, then navigate to a different quote to do the same thing with `.`. I'm not sure how I would do that in meow. `,g` doesn't seem to do anything relevant in Beacon mode, no matter where the fake cursors are.
[deleted] · 2022-10-10 16:37
[deleted]
nSeagull · 2022-10-10 16:38
I have my modifier keys rebound to the home row, so not really an issue for me
[deleted] · 2022-10-10 16:40
[deleted]
uita23 · 2022-10-10 17:26
You don't need to learn most of the vanilla binds. I would suggest that you know M-x and the most important C-h functions so if you ever find yourself needing to do a little with basic Emacs you can.
[deleted] · 2022-10-10 17:40
[deleted]
TurnipMonkey · 2022-10-10 17:54
If you are on a Mac you already can use some of the Emacs keybindings.
FluidDr1nker · 2022-10-10 19:06
I made peaces with using vim for programming and emacs(without evil) for org/denote/magit
CoolJKlasen · 2022-10-10 20:30
Same
krjonovo · 2022-10-10 20:39
Hi I don't know if this works with \`meow\` but I know of this package that emulates \`vi\`'s dot command [dot-mode](https://github.com/wyrickre/dot-mode) . Probably it will need some configuring to work well with \`meow\` but you can try it maybe it will work out of the box.
thoomfish · 2022-10-10 21:02
I think it probably won't work (at least, not quite as well as the vim feature), because most editing commands in styles like meow and kakoune operate on a region, and dot-mode has no way of guessing what region the repeat should operate on. But I'll definitely give it a shot and see.
Thanks!
alfamadorian · 2022-10-10 21:43
Yes, it's worth it.
strings___ · 2022-10-10 22:08
Yes it's worth it. I used vi style bindings for 20 odd years. What I did was bind space to a CTRL modifier using xcape or kmonad. And I just roughed it out till it's no longer an issue.
Evil is alright, but it's a never ending game of whack a mole. Best to just embrace the Emacs way IMHO
robopiglet · 2022-10-11 07:43
carpal. tunnel. syndrome.
nSeagull · 2022-10-11 08:13
Not if the homerow is rebound to modifier keys
EDIT: see the update in OP
Faumpy · 2022-10-11 13:53
> No need to switch from insert mode to normal mode
Genuine question, how is this difficult? or are you not in the stage where it's a subconscious thing? Lol
schmooser · 2022-10-11 19:33
Also missing that feature a lot after migrating from Evil to Meow. Also combos like ci), va” and the likes. For selections I use expand-region, for changing quotes, nothing, it’s rarely needed, so if in Lisp or Pune modes it’s [f/ to change something to [, also works for other delimiters, but the cursor has to be before opening bracket.
holgerschurig · 2022-10-11 19:41
It's taste, mostly.
I dislike the constant "enter insert mode" / "exit insert mode" quite heavily. i ESC even moves the cursor.
Others don't notice it, expect it, or like the verb/noun command structure so much that they bear with it.
And both positions are ok, IMHO.
holgerschurig · 2022-10-11 19:46
They are not universal.
You think of them as universal because you went to great lengths implementing them. But out of the box, Browsers like Firefox or Chromium don't have neither vi nor Emacs bindings.
inputrc (e.g. used in bash) has Emacs keybindings, like C-a or C-e, out of the box. But that's probably the only one that have them. It's however adopted from there into many programs.
schmooser · 2022-10-11 19:58
You don’t have vim everywhere, like in browser URL or in Slack or in random textarea on a web page. But with Emacs keybindings for text editing you can have that - in macOS edit DefaultKeybindings and you have most of it, consistent editing experience everywhere.
Disclaimer: I used vim for 10+ years, now using 50-50 Emacs and vim keybindings (Meow). Often vim sucks, 1) copy once, replace many times - since replace copies, you do “0p instead of p 2) going forward one char when in insert mode requires ESCfi, which is noncence.
thoomfish · 2022-10-12 02:14
> Also combos like `ci)`
Isn't this `,rc` by default?
deltille · 2022-10-12 05:58
Just as an FYI, the "i ESC moving the cursor back" thing is configurable in evil with `evil-move-cursor-back`.
It's one of the least sensical vi behaviors to me and the first thing I turn off,
schmooser · 2022-10-12 06:04
Yes, true, but it doesn’t work for ci>, cat (change around tags) and similar. I tried to add new Meow things at point but failed, so switched to expand-region.
aqua0210 · 2022-10-16 14:50
>or are you not in the stage where it's a subconscious thing?
It is not difficult. But this is the issue I concerned most. After using vim for a few months, when I need to use Microsof Word or Excel, I will unconsciously press ESC (or fj)
OutsideNo1877 · 2022-10-16 23:05
Im learning the emacs keybindings and am liking it a decent bit so far as well i wish there was something about how to edit text efficiently and what are the fastest ways to navigate buffers i know about the emacs tutorial but not much else i can find
paretoOptimalDev · 2022-10-17 13:38
There is an issue on Meow's github about this with a solution I believe. I saw it after searching 'vim', but don't have the exact link on hand.
Faumpy · 2022-10-22 15:48
Ah that's fair.