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

Emacs

313 readers
3 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.

you are viewing a single comment's thread
view the rest of the comments
[–] 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.