this post was submitted on 12 Oct 2023
2 points (100.0% liked)

Emacs

314 readers
2 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

If you hate key chords and do chordless editing... what do you use for it?

My story:

Evil: I came to Emacs after a long time of using Vim. Everyone told me to just use Evil and be done with it. I tried Devil but I dont know what it is about it that it left me dissatisfied. There was this feeling that I need to learn Emacs way of doing things. Because all documentation or tutorials I get have Emacs keys. Virtually none of them tell how to do same things in Evil. Always felt like an outsider. Jokes like C-x M-c M-butterfly made me feel like I am not in on the joke because I use Evil. I wanted to learn the Emacs way.

Pure Emacs: So I uninstalled Evil and went all in to pure Emacs keys. I learnt them quickly but key chords always felt difficult on my fingers. Then I found God mode and Devil mode. Great thing about both is that I don't have to define custom key-bindings or learn new key-bindings. They both work out of box and if I know Emacs bindings that's all I need to know.

God mode: First I used God mode for one month. Then I used Devil mode for one month. Both are similar but different. Similar that I don't have to learn new keys like Evil or Spacemacs. But difference is huge. God mode is modal. You are either in God mode or you are not. If you are in God mode you cannot insert text. Not a big problem when I am writing code. It feels like Vim if I am writing code. But it is a big problem when I am using ERC or Vterm or any sort of REPL. Like in Vterm if I change to God mode I cant insert commands. I have to disable God mode to type commands. The constant enabling and disabling of God mode in Vterm felt like burden.

That's why I never used set -o vi in Bash. Same problem with set -o vi ... you have to keep changing between insert and command mode to type command and edit commands. In full interactive prompts, modeless editing is best. So always set -o emacs for me in Bash. That is what drew me to emacs but that is a different story.

Another big problem with God mode is that it does not work in minibuffer. It works only very little in search mode. I think only s is supported in search mode. The other search mode commands don't work in God mode. I think this was my biggest problem with God mode. I mean a big nice thing about Emacs is that everything is a buffer and minibuffer is a buffer and all editing commands work in minibuffer. But God mode doesn't work in minibuffer. :(

Devil mode: Then I tried Devil mode for one month. I am liking it. It works fully in minibuffers and search mode. I am using it with its default , as devil key which is like the leader key in Devil mode. It doesn't disrupt my normal text editing. I can keep inserting text like usual but I can also run emacs commands by pressing ,mx. Don't have to disable/enable it everytime. I can always leave it enabled. Devil is also clever that when I typing lists like [10, 20, 30] it understands that I am writing normal text and it lets me write that without disrupting my flow. It multiplexes "insert mode" and "command mode" in a way that just works. I don't know they did it but it just works. And some keys that I feared running before like M-w or M-^ are so easy to do with Devil with ,mw or ,m^. Another one I like is ,m< or ,m> to go to the top and bottom. Navigation feels like Vim with things like ,nfpbnnnffbbb. Its just ,bnpf instead of hjkl.

So this is my journey of God, Devil and Evil and my review. Hope it was useful to some people. I think Devil might be it for me. Going to try it for another few months and report back if I find something new about it.

I also want to know from you if don't do key chords about what package you use and what you like or don't like about them?

P.S. The presence of all these modes make me happy that I did the right decision by switching to Emacs for life. So much choices. There is no way anyone will write packages like this which change the fundamental way to type keys in Vim. Is it even possible to change the basic way of handling key inputs in vim? But in Emacs, you can reimplement all key input handling from ground up to create a Vim within Emacs. Wow.

top 17 comments
sorted by: hot top controversial new old
[–] New-Yogurt-61@alien.top 2 points 1 year ago

Thanks, I’ve never tried devil. My next trial is meow mode.

But since I out in sticky keys rolling chords hasn’t really been an issue for me. I highly recommend sticky keys.

[–] 7890yuiop@alien.top 2 points 1 year ago (1 children)

I use sticky modifier keys at the OS level. No need for any Emacs config, and I get the benefit in every program.

[–] oantolin@discuss.online 1 points 1 year ago

I should try that!

[–] StMonty@alien.top 1 points 1 year ago

I currently use Meow, and I have gotten used to it. I prefer it over evil, because it feels better integrated.

[–] Schievel1@alien.top 1 points 1 year ago

If you think modal editing in buffers life vterm is a Burden, then remove god mode from the hooks of those buffers. That what I did for evil mode

[–] seregaxvm@alien.top 1 points 1 year ago
[–] Remixer96@alien.top 1 points 1 year ago (1 children)

Excellent overview!

As one not particularly attached to vim, I've dabbled with various evil toolkits and modes over the years because I really like the feel of the musicality of the commands. But over time, I also have also gotten wary of how much indirection I have to dig through to find or change anything. Changing anything in spacemacs was a pain. Even going pure evil led to a lot of weirdness in org mode where I spend 99% of my time.

I've just started on God mode, and I'm digging it so far. Since I spend most of my time in org, having the movement and structure editing always on hand is really nice... nevermind that suddenly reference cards are useful again!

I haven't given devil mode a shot, but since I mostly write prose and spend less time in the terminal I think I'm probably in the right spot for me, but the future could always be different.

[–] zigling@alien.top 1 points 1 year ago (1 children)

Thanks! In God mode, did it ever bother you that God key bindings don't work in minibuffer? The ones that used to trip me up most were God bindings like a and k. a will do C-a in normal buffer but not in minibuffer. k will do C-k in normal buffer but not in minibuffer.

[–] Remixer96@alien.top 1 points 1 year ago

It hasn't yet.

But since I'm mostly focused on prose and simpler commands, that tends to be more what I want than not.

[–] Remixer96@alien.top 1 points 1 year ago

It hasn't yet.

But since I'm mostly focused on prose and simpler commands, that tends to be more what I want than not.

[–] zigling@alien.top 1 points 1 year ago (1 children)

Thanks! In God mode, did it ever bother you that God key bindings don't work in minibuffer? The ones that used to trip me up most were God bindings like a and k. a will do C-a in normal buffer but not in minibuffer. k will do C-k in normal buffer but not in minibuffer.

[–] Remixer96@alien.top 1 points 1 year ago

It hasn't yet.

But since I'm mostly focused on prose and simpler commands, that tends to be more what I want than not.

[–] Y_Pon@alien.top 1 points 1 year ago

Well, it depends.

I have to use vim/vi at regular basis on remote hosts.

After 8+ years of using Emacs I've conclude:

- If Emacs keys => reassign Ctrl to Caps Lock

- If Vim keys => sometimes Emacs arised somewhere, so you have to know at least base of it. I set Emacs keys in Insert mode of Evil-mode, works fine.

- Additional mode keybindings that loaded after all other modes and provide my most used keybindings.

- Escape quits

Offcourse I can't hide my config :-) since init.el demonstration already part of emacsers culture :-)

https://github.com/underside/emacs-init/blob/01a8b2773c896a573a92637b3138d1169feafbb9/init.el#L1155

[–] 80286@alien.top 1 points 1 year ago

Since my work laptop comes with windows and no way of remapping caps lock with ctrl (for real, powertools can't be installed according to company policy), I was forced to look for alternatives. IIRC, first version of devil mode had just come out and while that version didn't quite do what I wanted, the newer versions are so good that I rarely miss the standard way.

Basically made my job tolerable.

[–] acow@alien.top 1 points 1 year ago

Thank you for sharing all these experiences! One thing is that I don't understand the god-mode commentary. I've used it for years, and it works in the minibuffer and I've never noticed any oddities with search. A caveat with minibuffer usage is that my modeline indicator of modality is not accurate for the minibuffer.

So, say I am editing a buffer in god-mode modality and I enter an interactive command. Now focus is in the minibuffer and my modeline still suggests I am in god-mode, but I am actually in normal mode (the modeline is attached to the buffer). If I switch modes, I can tell that I'm in god-mode by hitting a or e to navigate the line I'm editing in the minibuffer. Switch again to go back to normal mode editing in the minibuffer.

[–] jacmoe@alien.top 1 points 1 year ago

I am using Boon - tried Meow, god-mode, even EVIL, didn't like them, not ergonomic enough - and I don't think it's possible to find a more pleasant way of using Emacs!

I even added an alternative layout for HJKL navigation (VIM-like).

I can still use the normal Emacs key bindings, but most of the time I simply press one single key to navigate, or an action key followed by a modifier/movement key. I switch to Insert mode by pressing `v` and back to Command mode by pressing either `ESC` or - my own addition - `C-;` which is much more ergonomic, especially for touch typists.

Since there seem to be so few Boon users, I feel like I am sitting on a big secret :)

Here's my main layout:

https://preview.redd.it/ksuvuu7mwxvb1.png?width=834&format=png&auto=webp&s=94e0a2b101b4fb00e49179e58830d5d0583d7fa4

[–] FrozenOnPluto@alien.top 1 points 1 year ago

Wow quite a journey! I learnt Emacs decades ago so am wired to the usual key combinations, but I feel like devil-mode will be useful as I age, or if injuries make it harder to use two hands at once.