Evil for Emacs users
Hi all, I wrote a blog post where I tried to summarize the key things I wish I had known (as an Emacs user) when I first started using Evil. It isn't intended to be a thorough how-to, but if you feel like I've missed something major, please let me know! The learning curve for Evil is currently rather steep for those that haven't used Vim much; hopefully this provides a modicum of guidance for those coming from the Emacs side of the fence. http://dnquark.com/blog/2012/02/emacs-evil-ecumenicalism/ --Leo
On 2012-02-20 21:19 +0100, Leo Alekseyev wrote:
Interesting blog post! It highlights some areas in which the current documentation is rather lacking -- it's been neglected for some time now ... I've recently been looking to Frank's User Guide for vim-mode as a guide to improving Evil's documentation.[1] What is really needed -- and both your blog post and Frank's guide underline this -- is an overview of the different states and how they relate to Emacs' keymap hierarchy. Rebinding keys and configuring the initial state should also be dealt with in more detail, with instructive examples. Furthermore, maybe the "Settings" chapter should be moved to the end, since it might be a bit overwhelming up-front. (On the topic of settings, we could perhaps add an `evil-want-sparse-insert-state' customization variable for disabling most of the key bindings of Insert state.) [1] http://www.emacswiki.org/emacs/VimMode_-_User%27s_Guide -- Vegard
I find Evil suffers from some of the same problems as viper does: 1) Discoverability. In Emacs C-h b is useful. In vim, :help is wonderful. What does Evil give me that informs me what I can actually type? Referring to vim docs only goes so far. For example, typing d C-h doesn't bring up what I can then type (iw, or whatever). 2) How do I fix my problem? viper and Evil suffer from the same thing: a low-adoption alternative. There will always be a foo-mode out there that doesn't work well. What are the common problems and how do I fix them? I'm an elisp idiot. I get by on copy/paste from others. On Wed, Feb 22, 2012 at 5:24 AM, Vegard Øye <[email protected]> wrote:
On 2012-02-20 21:19 +0100, Leo Alekseyev wrote:
Interesting blog post! It highlights some areas in which the current documentation is rather lacking -- it's been neglected for some time now ...
I've recently been looking to Frank's User Guide for vim-mode as a guide to improving Evil's documentation.[1] What is really needed -- and both your blog post and Frank's guide underline this -- is an overview of the different states and how they relate to Emacs' keymap hierarchy. Rebinding keys and configuring the initial state should also be dealt with in more detail, with instructive examples.
Furthermore, maybe the "Settings" chapter should be moved to the end, since it might be a bit overwhelming up-front. (On the topic of settings, we could perhaps add an `evil-want-sparse-insert-state' customization variable for disabling most of the key bindings of Insert state.)
[1] http://www.emacswiki.org/emacs/VimMode_-_User%27s_Guide
-- Vegard
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Matt Armstrong <[email protected]> writes:
I find Evil suffers from some of the same problems as viper does:
1) Discoverability. In Emacs C-h b is useful. In vim, :help is wonderful. What does Evil give me that informs me what I can actually type?
Well C-h k still works, but that as well only goes so far ...
Referring to vim docs only goes so far. For example, typing d C-h doesn't bring up what I can then type (iw, or whatever).
AFAIR the vim docs break here down as well. The problem is the composability. For prefix keys there's the C-h convention to show the bound keymap. Maybe we could support that as well and show a generated cheatsheet ({i, a, o, ...} x text objects). I'm not sure if and how this could work out .. opinions?
2) How do I fix my problem? viper and Evil suffer from the same thing: a low-adoption alternative. There will always be a foo-mode out there that doesn't work well. What are the common problems and how do I fix them?
Problems: 1. Shadowed keys - Rebind them with `evil-define-key' or `evil-declare-key' (or Leo's `evil-undefine') or - change initial state to emacs-state (if it's not an editing mode - there's a lot of them) 2. Well .. everything that goes above that is not common and may require some elisp - Feel free to ask here
I'm an elisp idiot. I get by on copy/paste from others.
Well you should change that ;) Really: It takes the possibilities of Emacs usage to another level. Michael
I find Evil suffers from some of the same problems as viper does:
1) Discoverability. In Emacs C-h b is useful. In vim, :help is wonderful. What does Evil give me that informs me what I can actually type?
Well C-h k still works, but that as well only goes so far ...
Referring to vim docs only goes so far. For example, typing d C-h doesn't bring up what I can then type (iw, or whatever).
For prefix keys there's the C-h convention to show the bound keymap. Maybe we could support that as well and show a generated cheatsheet ({i, a, o, ...} x text objects).
A configurable option to turn on a "cheat sheet" like this would be super helpful, especially for those new to Vim. I believe there are standard (?) ways to achieve this -- at least, I've seen it in many modes (e.g. cua-rectangle).
2) How do I fix my problem? viper and Evil suffer from the same thing: a low-adoption alternative. There will always be a foo-mode out there that doesn't work well. What are the common problems and how do I fix them?
Problems:
1. Shadowed keys - Rebind them with `evil-define-key' or `evil-declare-key' (or Leo's `evil-undefine') or
Correction: evil-undefine is all Frank's -- a solution to something I asked on the list earlier :) In terms of keybindings, conflicts are virtually unavoidable, but between sensible defaults and ease of customization, it should be at worst a minor inconvenience. What constitutes sensible defaults might be very user-specific. My hope is that with greater adoption of Evil, the pain points will become more clear, and eventually there will be a set of reasonable defaults/guidelines/suggestions that would minimize these frictions. Somewhat more worrisome to me are behaviors that are fundamentally incompatible between Emacs and Vim, such as the "on character" vs "between characters" cursor placement in normal/visual vs insert modes (one can think of it in terms of closed or open intervals). It would be worthwhile identifying such incompatibilities. To an extent, Evil could compensate for this; for example, the recently-implemented evil-want-visual-char-semi-exclusive makes Evil "do the right thing" (from an Emacs user's perspective) when doing visual selection at the beginning/end of lines. Certain other things, e.g. s-expression motions in normal/visual modes, remain somewhat broken (in the off-by-one sense). I'm not sure if a general solution to this is possible, but it's something worth thinking about. --l
participants (4)
-
Leo Alekseyev -
Matt Armstrong -
Michael Markert -
Vegard Øye