reddit / emacs

Modal editing: Evil, Boon or Meow?

rt49 · 2022-09-15 13:42
I am considering some modal editing options for Emacs: Evil, Boon and Meow. All things being equal, I would feel more inclined to choose Evil, since I have some Vim proficiency and also it is the most widely used/supported. However, I read that one problem of Evil is that it can interfere with Emacs keybindings (perhaps only in some modes). Is there such a problem with Boon and Meow too? If you have experience with these packages, can you comment on why you picked one over the other? I am a Dvorak user, if that matters.
[deleted] · 2022-09-15 14:29
[deleted]
CorysInTheHouse69 · 2022-09-15 14:35
I like god mode bc it is essentially modal but preserves all emacs bindings
lj-read-it · 2022-09-15 14:38
Dvorak & Evil user here. I come over from Vim so Evil was the natural choice for me. In fact if it weren't for the availability of Evil Mode I would not have made the move to Emacs. Evil keys don't interfere with most Emacs keys--all default Org bindings I use are fine, for instance--but single-key bindings in some other packages like elfeed can indeed be shadowed by Evil Mode. In that case I look up the commands for that mode (C-h m) and there are often alternate bindings. Push comes to shove I can make custom keybindings, but I haven't felt the need to do so to make up for Evil shadowing keys. With the evil-collection package Vim navigation and editing keys work beautifully in mu4e, Org Mode & Agenda as well.
alecStewart1 · 2022-09-15 15:03
> I would feel more inclined to choose Evil, since I have some Vim proficiency and also it is the most widely used/supported. Sounds like you should use Evil then, lol. That aside, Boon is more about ergonomics and, from what I gather from trying it myself, is a bit better suited for non-QWERTY keyboards. I could be wrong about that. Meow seems like a nice compromise between Vim/Kakoune-like keys while making use of the existing kmacro system and not reinventing that, movement, highlight/visual and marking keys, whereas Evil is an entire emulation of Vim's modal editing. I myself moved away from modal editing to actually learn the existing Emacs functionality and I don't feel any less efficient than I was when I was using Evil. There is also god-mode which basically just removes modifier keys (Control, Alt/Meta, etc) as well, but I've never tried it.
thetemp_ · 2022-09-15 15:39
Fellow Dvorak user here. I tried Evil for quite some time and became fairly proficient in Vim bindings (wasn't a Vim user before using Emacs). I felt that Evil was too heavy of a solution for my tastes. It was too much trouble to bend it to my will. And it didn't mesh at all with Emacs's native bindings. To me, **Meow** is the perfect modal editing system. It's extremely efficient, and it meshes very well with the way Emacs already works. The [way it works](https://github.com/meow-edit/meow/blob/master/EXPLANATION.org), you're (almost) always selecting text. And you use the selection not just for editing, but for navigation too. Press the key for selecting a line, and you'll be at the end of the line. But then you can press the key to reverse direction, and suddenly you're at the beginning of the line instead. It gets a lot done with a few keys. Meow takes a little getting used to, but it's really fun once you do. I prefer it to the Vim editing model, because you can see what you're operating on before you do it. The number hinting can be a distraction, but it's easy to turn that off. It comes with *suggested* layouts for QWERTY, Dvorak, Programmer Dvorak, and Colemak users. But the layouts are completely customizable. I've been very happy with the Programmer Dvorak layout though. Another option worth considering is [Xah-Fly-Keys](http://xahlee.info/emacs/misc/xah-fly-keys.html). It doesn't really add any new concepts, but it is a very fast layout, and is designed based on command-use statistics.
ForkInBrain · 2022-09-15 15:49
> I myself moved away from modal editing to actually learn the existing Emacs functionality and I don't feel any less efficient than I was when I was using Evil. Same. I actually learned Emacs first, then spent a few years working in a terminal over a slowish link, where vim shined, and now 20 years back in Emacs. It took me a few years to realize that all the modal editing "stuff" over Emacs made things harder, and all it really did for me was shift my RSI from the ctrl key to the esc key. I found myself staying in "insert mode" for longer and longer periods of time. The day I switched off VI emulation was almost a revelation. This was before evil -- I was using viper mode.
Greenskid · 2022-09-15 16:15
I use Evil (and Doom Emacs which comes with great mnemonic based keybindings). A great benefit of using Evil is that one remains proficient at using Vim. While I live in Emacs most of the time, there are times when I need the efficiency of Vim. Without Evil and helper packages I would never have seriously switched from Vim to Emacs.
thoomfish · 2022-09-15 16:37
I'm conflicted, because I'm currently heavily invested in Doom and Evil, but I do think the Kakoune/Helix/Meow way of doing things is better because it offers visual feedback that reinforces what you're doing.
JosephFerano · 2022-09-15 17:38
I've been using vim keybindings everywhere for about a decade now. This last month I switched to emacs keybindings, obviously shuffling a few things around where it made sense. I've also played around with Boon and Meow, looking to switch. Here are my general impressions; Evil has a lot of things going for it. There's a ton of extensions. Even for esoteric things like **clever-f**. Sometimes it seems like package authors even give evil priority, **evil-textobj-tree-sitter** is an example. If you speak vim, this is one of the best emulations out there. While I miss some of the **nmap** style keybindings, honestly I can see why some people say that evil is a better vim than vim, since the introspectability and extensibility of emacs enhances the whole thing. However, it has its issues. Even after about a year of Emacs usage, I would still fumble around like an idiot if I ever broke my config while working on it. Certain modes like Magit have several important bindings shuffled around which is a bit confusing when reading the docs. Sometimes, although pretty rare, you do feel like evil is an additional package, rather than properly baked in. Feels like it adds extra weight to your config and experience. Also, while modal editing is good, it has a few areas that can be improved. So with that in mind, I switched to emacs. With the Caps/Ctrl swap, it's honestly not as bad as it's made out to be. It's closer and easier on my hand than having to reach for Esc a couple of hundred times a day. There's a package for binding actions to key combos I need to check out. Mickey from Mastering Emacs calls the keybindings "Transient Modality", which makes sense. And Emacs generally maintains "tempo" in a way where you can just type a sequence of characters with the Ctrl key held down, so it's not bad. I also like that for certain actions, they do beat modal editing in "vim-golf" scenarios. While there aren't a ton of scenarios, these scenarios present themselves often enough. Indeed it is annoying to have to Esc so much with modal editing for quick little things like moving the cursor forward a couple of chars. Couple of things I don't like about emacs though; the lack of text objects means that there tends to be a proliferation of keybindings, to the point where they take up too much space. There's a keybinding to mark a word, a paragraph, a defun, a sexp, etc; That's less spots for your own keybindings. They also tend to be less mnemonic than vim; my inner voice would sometimes say vim motions while I did them. Also there are certain things I still haven't figured out how to do the emacs way, such as repeating stuff and moving back and forth between inserts and jumps. Packages that I think might help make Emacs more efficient for me; https://github.com/paldepind/composable.el https://github.com/cute-jumper/embrace.el Also, I think that packages like Avy can be extended and used to make advanced edits more efficient. In regards to Boon and Meow, they definitely seem to play nicer with Emacs compared to Evil. Both Boon and Meow don't overtake special modes. Both have god-mode like modifiers. I'm leaning towards Boon because it uses multiple cursors and avy a bit more, while Meow uses kmacro and it's own avy like movement. While kmacro is native emacs, I like MC's visual feedback more. Boon has some interesting text-objects and operators as well. The binding facilities in Boon are standard emacs, while Meow has it's own thing going on. I made Boon feel more like regular vim because I'm not sold on the spatial aspect, I do rather prefer mnemonics, but it's trivial to rebind. I'll keep playing around with Boon for the next few days, also experiment with Meow some more. Another mode I want to check out is Kakoune.el, see how it compares.
Greenskid · 2022-09-15 17:59
Getting visual feedback is indeed nice. Vim modal editing does promote making lightning fast edits at the speed of thought, requiring lots of practice and accuracy. However if one makes mistakes then one can quickly undo and redo with fixes. It's more focused on composition which is certainly not needed for light editing needs. I guess one's needs are a primary factor in choosing from the options out there.
LynxOfTheWastes · 2022-09-15 18:05
I stick with evil, just because there are some small config edits and such that I can't be bothered to open emacs for and will just do in nvim. Helps if both of my editors work about the same as far as basic workflow goes.
dixius99 · 2022-09-15 18:05
I'm hardly a power user, but I just find the Emacs model easier to understand and remember.
thoomfish · 2022-09-15 18:15
My understanding is that the Kakoune editing model is just as powerful as vim's. It has the same nouns and verbs, the difference is the word order is noun-verb instead of verb-noun, because having visual feedback on whether you got your noun correct is useful (and allows for fine tuning if you didn't without having to undo and start a whole complicated command over again).
Greenskid · 2022-09-15 18:52
Is there an implementation of the Kakoune editing model in Emacs? I have been enjoying getting more familiar with both Emacs and Vim keybindings since they are both ubiquitous. I am willing to take the hit on dealing with their idiosyncrasies e.g. Emacs keybinds for all things GNU, macOS; and for Vim there is even a vim-golf (don't think such a thing exists for other editing models). So I am totally leaning into Emacs + Evil + Doom.
CochinoChingon · 2022-09-15 19:20
I like kakoune for visual of seeing my selection before Yank/Xelete. There were some plugins in vim that weren't available in KAK. Eventually I just got used to jumping into Visual-mode to "see" me selection before I do any edits. I'm just a prose writer, so Doom out the box covers most of my needs. Though systemcrafters/crafted emacs is intriguing.
choangalvez · 2022-09-15 19:22
You'll need to setup the meow layout before starting the tutorial. Diagonal reading the installation instructions drive me nuts for a while! Check https://github.com/meow-edit/meow/blob/master/GET\_STARTED.org#set-up-command-layout
CulturMultur · 2022-09-15 20:10
I switched from Evil to Meow. Evil is too complex to me, as I was unable to understand how to bind keys in Emacs using its standard functions, so had to use general.el and specify Evil modes. After I saw Meow, I switched to it and now enjoy both modal editing and Emacs keybindings. Still not used to Meow's number-based selection extensions, don't use them, so probably will turn them off.
alcanost · 2022-09-15 21:54
I use Evil simply because when I came to emacs, I was already proficient enough in vim that I wished to keep my muscle memory. It is true tjat it might be annoying in some modes (_e.g._ helpful, sly or flymake), but then I just set these to emacs-mode by default.
[deleted] · 2022-09-15 21:57
[deleted]
[deleted] · 2022-09-15 22:01
[deleted]
heyaanaaya · 2022-09-15 22:02
Evil does interfere with bindings in some modes, but https://github.com/emacs-evil/evil-collection fixes a lot of these issues, both for built-in modes and a lot of popular third-party ones. In my experience it "just works" for pretty much everything I throw at it. I'm fairly liberal with my use of third-party packages (particularly actively-maintained/well-known ones), and very rarely do I need to tweak keybindings after installing something new. I haven't used Boon or Meow, so can't speak to how good they are. For me, evil-mode was sort of an obvious choice for consistency with other parts of my system/the world at large.
karthink · 2022-09-15 22:22
> With the Caps/Ctrl swap, it's honestly not as bad as it's made out to be. It's closer and easier on my hand than having to reach for Esc a couple of hundred times a day. Why not use Caps as Esc? You could map Caps to both Ctrl (when held down) and Esc (when tapped) as well.
[deleted] · 2022-09-15 22:53
[deleted]
Selenebun · 2022-09-16 00:19
There's also `<C-[>` which works as an escape key with no configuration required. I have my caps lock key remapped to ctrl and just use `<C-[>` and it works very well for me.
kamui78 · 2022-09-16 01:20
Inspired by your post I have tried Meow. It has some interesting concepts but I will stick to Evil, because of the better compatibility with the Vim keybinding. I understand that they wanted to do something different and that they wanted to include the Emacs keybinding as well. But to me, this way, they have lost a lot of potential users. For example, I still use vim from time to time (ssh sessions is one example), and I don't want the mental overhead of thinking about my key bindings. By breaking the vim compatibility Meow gains the ability to express modal editing in a new way but it also loses users.
gf3 · 2022-09-16 01:38
I have used both Evil and Meow extensively. While I fundamentally agree with the design of Meow over Evil—Evil has much better support and integration across emacs and related packages. I eventually ended up going back to Evil after months of Meow. Unfortunately Meow would often break under certain scenarios or there are many corners of emacs where it simply does not work at all. I now split my time between Helix editor and emacs with Evil mode.
tangonov · 2022-09-16 02:41
Evil if you can accept that modes/buffers not covered by `evil-collection` will rip you out of your comfort zone and back into the Emacs way of doing things. Evil without `evil-collection` if you're happy with non-editing buffers being Emacs defaults. Meow if you cannot manage either. Props to Meow regardless as the experience with Meow is the most uniform and you can bind every aspect of how Meow works everywhere in one small collection of keybinds. The only drawback with Meow is it's still young and its fancier features like `beacon-mode` can cause WTF moments. I just use `god-mode` after spending countless hours with the previous two. I personally just want a thing that works the same way everywhere.
gonsie · 2022-09-16 03:33
How do you manage the Dvorak & evil bindings? Do you still use the normal evil bindings, or do you have Dvorak adjustments? I use Dvorak and have been looking to learn modal editing. Evil would be nice (since I would essentially be learning vim), but the Dvorak layout seems too wonky to me with the defaults.
404cn · 2022-09-16 03:41
Dvorak user, I use meow.
lj-read-it · 2022-09-16 05:00
No adjustment to the Evil bindings, other than keyboard-level mods discussed below. I actually find Dvorak more intuitive than QWERTY for Vim/Evil. The hjkl direction keys are the only change that really matters, and the fact that the vertical jk are on the left hand and next to each other while the horizontal h and l are on the right hand makes them more easily differentiated for me. In fact, during the occasions when I have to use Vim with a QWERTY keyboard (configuration reset, admin on an external system) hjkl keys confuse me because it's not intuitive which are vertical and which horizontal. Everything can be overcome with training & muscle memory, of course, I just wanted to make the point that hjkl on the home row of the same hand is not inherently easier to grasp. One major adjustment I made was to put L on home row because it's painful to reach on my keyboard with the pinkie at home +1. S is now on home -1 while Z is on home +1, which suits my usage and physical keyboard dimensions much better--all the more because I already sharply cut down on the use of Z by configuring a pseudo-Vim layer on my keyboard (an Ergodox EZ, this is also how I changed the L and other key locations). I use thumb key+ u to undo, not ctrl +z. Okay so maybe I am a TAD fanatical about Dvorak and Vim keys? 😅 So definitely take the other comments on board and don't let me bias you!
joncol79 · 2022-09-16 05:47
I use a key chord to exit insert-mode. When I was using the qwerty keyboard layout, I used "jk" for it (not part of many common words). Now, when on Colemak, I use "lh". Pretty easy to configure (with specific delay) using general.el, for example.
FitPandaFu · 2022-09-16 05:54
Curious, wouldn't this be similar to heavily using visual mode in vim?
thoomfish · 2022-09-16 06:30
Yeah, but with pretty frequent automatic resets.
Vince_Vice · 2022-09-16 07:27
+1 for meow For me it was the only feasible choice (haven't tried boon tho) when I wanted to have a modal editing system. I use a rather niche keyboard layout and wanted evil to work, but rebinding simply was too complex to pull off. Meow is beautifully conceptualized and is basically designed to be keyboard layout agnostic. Meaning instead of coding the keybinds and then you override those on top, it exposes functions for you to bind and then provide suggestion bindings. It also allows you to bind key sequences to other key sequences. Thats 1 reason why it integrates well with existing keybinds, another is the keypad mode, thats similar to a temporary god mode. That is particularly useful if you use one of the emacs "distributions" (doom, spacemacs)
divinedominion · 2022-09-16 13:50
+1 for Xah Fly Keys
zapbox · 2022-09-16 14:16
Another vote for Xah Fly Keys. Colemak layout user here, so Xah Fly Keys is compatible with all different layouts you like.
ComfortableAware6288 · 2022-09-16 21:28
Bound Insert=>Normal to "C-c" as vim does, happy with
rt49 · 2022-09-18 04:35
OP here. I have decided to try Meow and am currently doing the tutorial. Looks great so far. Thanks everyone for all the great answers. Lots of interesting stuff in them.
graduale · 2022-09-30 00:15
Can you do this just with elisp? Or do you to use something like Karabiner etc? (Sorry, completely ignorant here)
karthink · 2022-09-30 00:55
You can't do this with Elisp, best I can tell. I use xmodmap/xcape to do this on Linux. On Macs you'd need software like kmonad or (possibly) karabiner.
graduale · 2022-09-30 01:34
Thanks! That’s what I thought but you never know with Emacs!