Evil: Vim Keybindings Inside Emacs Without Leaving Emacs
The extensible vi layer for Emacs.
At a glance
- What is it?
- Evil is an extensible vi layer for Emacs that emulates Vim's main features and exposes extension points for custom operators, states and keymaps. Here is how it installs, how its states and keymaps fit together, and where it stops being the right choice.
- Who is it for?
- Adopt Evil if you already live in Emacs and want Vim's modal editing without leaving it, and you accept that some Vim behaviour is reimplemented rather than inherited. Do not adopt it if you need Vim's exact plugin ecosystem or a terminal-only editor with no Emacs Lisp in the loop.
- Can I use it commercially?
- Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Yes. The repository last received commits 110 days ago.
- What is it written in?
- Mainly Emacs Lisp, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 13, 2026, and from our analysis. They are not legal advice.
Star history
- emacs-evil/evil3,870 ★ · +13
| Repository | 2026-09-24 | 2026-11-13 |
|---|---|---|
| emacs-evil/evil | 3.9k | 3.9k |
13 Stars in the last 50 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What Evil solves, and who actually needs it
Emacs ships with its own default keybindings, and they are not modal. Vim users who try Emacs tend to bounce off that difference before they discover anything else, because their fingers keep issuing commands the editor does not recognise. Evil closes that gap. It is a layer, not a fork: Emacs remains Emacs, and Evil adds a vi emulation on top of it. The README describes it as an "extensible vi layer for Emacs" that "emulates the main features of Vim, and provides facilities for writing custom extensions."
The audience is narrow and specific. If you write Emacs Lisp, use Emacs packages, and want to keep doing that while editing in normal, insert and visual modes, Evil is aimed at you. If you have never used Vim and have no interest in modal editing, Evil adds a state machine you did not ask for. If you want Vim itself, with Vim's own scripting language and plugin ecosystem, Evil is the wrong layer entirely: it reimplements Vim behaviour in Emacs Lisp, so the two will diverge wherever Emacs has no equivalent primitive.
How Evil works: states, keymaps and the Emacs Lisp underneath
The repository layout tells most of the story. Evil is split into many evil-*.el files rather than one monolith, and the names map to subsystems: evil-states.el handles the modal states, evil-maps.el holds the keymaps, evil-commands.el defines the editing commands, evil-search.el covers searching, evil-ex.el implements the ex command line, evil-repeat.el handles the . repeat system, and evil-jumps.el tracks the jump list. evil-core.el and evil-common.el hold the shared machinery, and evil-integration.el connects Evil to other Emacs packages.
That split matters when you extend it. Adding a custom operator or a new state means touching the relevant file's public macros rather than patching a single large file, which is the sense in which the layer is extensible. Evil also has to bridge two undo models: Emacs's native undo and Vim's expectations around C-r. The README states that C-r requires one of undo-redo from Emacs 28, the undo-tree package, or the undo-fu package. Similarly, the motions g; and g, and the last-change register, depend on goto-chg.el, which provides goto-last-change and goto-last-change-reverse. Those are external packages, not bundled code, and they are the seams where Evil's emulation depends on something outside itself.
Installing Evil from MELPA and turning it on
The README points to the official documentation for full installation instructions and recommends package.el. The quickstart it gives is a block of Emacs Lisp you add to your init file. It configures package.el to use MELPA, refreshes the package list, installs Evil if it is not already present, and enables the minor mode:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(package-refresh-contents)
(unless (package-installed-p 'evil)
(package-install 'evil))
(require 'evil)
(evil-mode 1)After restarting Emacs, the mode line should indicate Evil is active, and normal-state keys should work: h, j, k and l move the cursor, i enters insert state, and Escape returns you to normal state. If nothing changes, the mode is not enabled, and the first thing to check is whether the require and evil-mode calls actually ran.
Evil is also listed on MELPA Stable and NonGNU ELPA, so the package-archives entry above is not the only source. Evil requires Emacs 24.1 or later. For Emacs 24.1 and 24.2 it additionally requires cl-lib. If you are building from a checkout rather than installing a package, the repository has a Makefile: make compile byte-compiles the sources, and make test runs the test suite, with a TAG variable to narrow it to one tag or test name, for example make test TAG=repeat.
The undo dependency is the sharpest edge
The most concrete limitation in the README is not a missing Vim feature. It is a dependency. C-r is a core Vim binding, and Evil cannot provide it from its own code alone. You need undo-redo from Emacs 28, or undo-tree, or undo-fu. If none is installed, that binding is unavailable, and the documentation does not describe a fallback. Notice also that undo-tree is hosted on GitLab and undo-fu on Codeberg, so both live outside the Emacs package archives the quickstart configures, even though the README lists them as available via GNU ELPA and MELPA/NonGNU ELPA respectively.
The goto-chg.el dependency is similar but narrower: g;, g, and the last-change register simply do not work without it. These are not exotic features, so a fresh install that skips the dependency list can look broken in ways that are hard to attribute. The README does not document rollback or what happens if you remove Evil after using it, and the repository has no published releases, so version-to-version upgrade notes are not available. CHANGES.org exists in the repository root, which is where change history would be recorded, but its contents are not part of what is documented here.
Evil versus running Vim, and versus Vim emulation elsewhere
The honest alternative is Vim itself, or Neovim. The difference in approach is not cosmetic. Vim executes Vim script and loads Vim plugins through its own runtime; Evil reimplements Vim's behaviour in Emacs Lisp and runs inside the Emacs process, so what you get is Emacs with vi-like editing, not Vim. Every Vim plugin that relies on Vim's internals has no direct equivalent, and behaviour around edge cases will differ wherever Emacs's model does not match Vim's.
The reverse trade also holds. Choosing Vim means giving up Emacs Lisp, Emacs's package ecosystem, and the integration that Evil inherits for free because it lives in the same process. Evil's own repository reflects this: evil-integration.el exists precisely to connect the vi layer to other Emacs packages. If your work depends on Emacs packages, running Vim instead of Evil is not a swap, it is a different toolchain. If your work depends on Vim plugins, Evil is not a swap either. The choice is about which ecosystem you are already committed to.
Maintenance, licensing and what an upgrade costs you
The repository is not archived, and the last push was on 2026-07-28. That is recent enough that the project is not dormant, but the README does not state a release cadence and the repository has no published releases, so there is no version history to reason about. The practical upgrade cost is the dependency set. Evil's own code can be updated through package.el, but the C-r path and the goto-chg motions depend on packages that version independently. When you upgrade Emacs itself, the undo-redo path changes: undo-redo is only available from Emacs 28 onward, so an upgrade or downgrade across that boundary changes which undo package you need.
Evil is licensed GPL-3.0, and the repository carries a COPYING file. For most users this is a non-issue, since Emacs itself is GPL. It matters if you plan to redistribute Evil inside a larger proprietary product or link it into code you do not intend to license compatibly. That is a question for a lawyer, not for this article, but the licence identifier is worth checking before you build on it rather than after.
Editorial conclusion
Adopt Evil if you already live in Emacs and want Vim's modal editing without leaving it, and you accept that some Vim behaviour is reimplemented rather than inherited. Do not adopt it if you need Vim's exact plugin ecosystem or a terminal-only editor with no Emacs Lisp in the loop. Before committing, verify the C-r undo path on your Emacs version, since Evil requires undo-redo from Emacs 28, undo-tree or undo-fu, and check that goto-chg.el is available for g; and the last-change register.
Frequently asked questions
How do I use Evil mode in Emacs?
Add the package.el setup from the README to your init file, install Evil from MELPA, then call (require 'evil) followed by (evil-mode 1). After restarting Emacs, normal-state keys such as h, j, k and l should move the cursor and i should enter insert state.
Does Evil require a specific version of Emacs?
Yes. The README states that Evil requires Emacs 24.1 or later, and that for Emacs 24.1 and 24.2 it also requires cl-lib. The C-r binding additionally needs undo-redo from Emacs 28, undo-tree, or undo-fu.
Why do g; and the last-change register not work in Evil?
Those motions depend on the goto-chg.el package, which provides goto-last-change and goto-last-change-reverse. The README lists it as required for g;, g, and the last-change register, and it is available via MELPA and NonGNU ELPA.
How do I run Evil's test suite?
The Makefile provides make test, which runs the suite through Eask, and make tests, which byte-compiles first, runs the tests, then cleans up. The TAG variable narrows the run to one tag or test name, for example make test TAG=repeat.
Is Evil the same as Vim?
No. The README describes Evil as an extensible vi layer for Emacs that emulates the main features of Vim and provides facilities for writing custom extensions. It runs inside Emacs and is written in Emacs Lisp rather than being a Vim build.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/emacs-evil-evil)Star history chart for your README
[](https://hysenlabs.com/projects/emacs-evil-evil)Was this useful?