doomemacs/modules/feature/evil
Henrik Lissner c7254e7bdc
Major optimization refactor, across the board
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster
  startup; ~5-20% general boost
+ reduce consing, function calls & garbage collection by preferring
  cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and
  various cl-lib filter/map/reduce functions) -- where possible
+ prefer functions with dedicated opcodes, like assq (see byte-defop's
  in bytecomp.el for more)
+ prefer pcase & cond (faster) over cl-case
+ general refactor for code readability
+ ensure naming & style conventions are adhered to
+ appease byte-compiler by marking unused variables with underscore
+ defer minor mode activation to after-init, emacs-startup or
  window-setup hooks; a customization opportunity for users + ensures
  custom functionality won't interfere with startup.
2017-06-09 00:47:45 +02:00
..
autoload Major optimization refactor, across the board 2017-06-09 00:47:45 +02:00
config.el Major optimization refactor, across the board 2017-06-09 00:47:45 +02:00
packages.el Extract neotree from feature/evil => tools/neotree 2017-06-05 00:51:56 +02:00
README.org Add feature/evil README 2017-06-05 12:57:53 +02:00

:feature evil

This holy module brings vim to Emacs.

Removing evil-mode

Some users want vanilla Emacs back. To do so remove :feature evil from init.el. Evil-specific configuration and keybindings (defined with map!) will be ignored without evil present (and removed when byte-compiling).

Differences from vanilla evil

Overview

  • A better :g[lobal] command with match highlighting
  • :al[ign]: an ex interface to align-regexp with match highlighting
  • Support for more of vim's filename modifiers in ex commands (like :p, :p:h or :t) than vanilla evil-mode offers.
  • A list of new text objects:

    • Blocks: B (from evil-textobj-anyblock)
    • Args: a (from evil-args)
    • Indentation: i / I / J (from evil-indent-plus)
  • Ported vim plugins:

    • vim-commentary => evil-commentary
    • vim-easymotion => evil-easymotion
    • vim-multiedit => evil-multiedit
    • vim-multiple-cursors => evil-mc & evil-multiedit
    • vim-seek or vim-sneak => evil-snipe
    • vim-surround => evil-embrace & evil-surround
  • NERDTree equivalent is available in :tools neotree

Multiple-cursors

Two multiple-cursor implementations exist in this module: evil-mc and evil-multiedit. Together, these provide the functionality of vim-multiple-cursors.

The former lets you place "clone" cursors. The latter lets you interactively edit many regions from one place (like an interactive version of :%s).

A saner code-folding system

This module combines evil-vimish-fold (allows arbitrary folds) and hideshow (folds based on markers and indent) to create a more consistent code-folding system. All the vim folding keys should work (zr, zm, za, zo, etc).

Hacks

  • Automatically moves to new window when splitting
  • If in visual mode, * and # will search for the current selection instead of the word-at-point.

Differences from vim

  • Column-wise ranges in ex commands are enabled by default. i.e. the range in :'<,'>s/a/b will only affects the visual selection, not full lines (see evil-ex-visual-char-range).
  • :g will highlight buffer matches incrementally.