New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using evil-leader on specific modes (in Emacs state) #16
Comments
I don't concur this is related to #2. But on to the issue: (defadvice evil-leader-mode (around maybe-no-non-normal-prefix activate)
(let ((evil-leader/non-normal-prefix (if (member major-mode '(magit-mode))
""
evil-leader/non-normal-prefix)))
ad-do-it)) Adjust the mode list to the modes you don't want to be prefixed. For the longterm, I think your idea is useful but I'm unsure about the way to tackle it:
or the more flexible approach
|
Michael Markert notifications@github.com writes:
The reporter wanted to use the leader mechanism (without prefix) on all "In theory you could customize the prefix to "" but I'd advise against We can easily work-around that problem with
Thus, if This has some problems (the user might change I guess that you'll say that all this is a good reason for me submitting As for your suggested advice that addresses my question, it works. Thank
IMO a list of regexps is most practical. Magit, for instance, may create BTW, I don't think it is a good idea to disable the prefix on the Thanks again for evil-leader and for solving my request. |
Addresses issue #16. Signed-off-by: Michael Markert <markert.michael@googlemail.com>
Thansk @cofi for implementing There is a small typo on the FAQ:
I think the opening parenthesis is misplaced:
OTOH, on the discussion above I suggested a list of regexps, not a single regexp. The reason is that a single regexp can quickly turn into something difficult to read. Compare
with
But this is a minor detail (and Emacs uses variables holding regexps on quite a few places.) Thanks again. |
Re paren: Well, it was intended but I rephrased it now. I changed it now to a list of regex but I'm not exactly with your reasoning there.
|
Michael Markert notifications@github.com writes:
Uh, sorry. I see that the original phrasing is idiomatic English indeed.
Sure, but not everybody is so Elisp-savvy as us :-)
I wasn't aware of the existence of
Thanks for being so responsive (even on the cases where you are right!) |
Hello, one happy user here.
Some non-editing major modes that run in Emacs mode (magit, for instance) could put evil-leader to good use without requiring to punch
non-normal-prefix
. Thus, ",b" would work on magit as if it were in normal mode.Something like
My question is: what should
<?>
be for achieving what I want? I hope there is a trick with keymappings that achieves that.BTW, this is somewhat related to #2
The text was updated successfully, but these errors were encountered: