Selective use of evil mode (was Re: implementations-list Digest, Vol 36, Issue 14)

Eric S Fraga e.fraga at ucl.ac.uk
Fri Oct 21 10:12:20 CEST 2011


Neeraj Sharma <neeraj.dl at gmail.com> writes:

> 2. How do I make certain modes to not appear in vi modes. For example I use
> gtags-mode and when in Gtags-Select mode (where it shows the list of
> matching tags), it defaults to vi normal mode (which I'd be fine with except
> pressing enter in vi normal mode does not go to the tag in source file).
> Currently I have to do C-z to go to emacs-mode and then press enter
> etc.

One way might be to add the appropriate command to turn off evil mode to
the mode hooks for those modes.

I actually take the opposite approach.  I do not have evil enabled
globally.  Instead, I add "(evil-local-mode 1)" to the mode hooks for
those modes I want to use evil with (e.g. text, emacs-lisp, org, maxima,
matlab, message, ...).

This does lead to some confusion sometimes but generally works quite
well.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.90.1 + No Gnus v0.18




More information about the implementations-list mailing list