Editor states - Evil or Holyλ︎
Multi-modal editing simplifies keybindings for everything, keeping your hands centered on the keyboard and increasing your productivity. Multi-modal approach minimizing the need for key chords that are slower and a common source of repetitive strain e.g.
C-c C-x M-j
When installing Spacemacs you have the choice of editor styles
|Among the stars aboard the Evil flagship (Vim)||Vim multi-model editing (normal, insert, visual, lisp, etc.
|On the planet Emacs in the Holy control tower (Emacs)||Emacs only editing (No Vim states)|
Evil provide Vim style editing across all languages and modes in Emacs, simplifying the editing of files and keyboard shortcuts (keybindings)
Vim is a language for manipulating text files that goes far beyond editing files. Learning this simple language removes cognitive load. Speak vim and your fingers efficiently make the changes you want.
Multi-modal editing can take some adjustment and time to become comfortable.
Visual states are the first ones to get used to.
Each state has a specific purpose, eg. normal mode is about manipulating existing text where insert state is about adding more text.
Using a state for different types of editing actions greatly simplifies the keyboard bindings and arguably makes editing faster, especially once you get used to multi-state editing.
This speed is in part due to simpler keybinding when in normal mode as you are not typing content into the editor, simply running commands with each key press. This means you can have single characters to do many of the common commands, eg
l instead of
C-f for moving the cursor forward.
If you are deeply connected to the with Emacs keybindings, then probably best to stick to holy mode.
If you are new to Emacs or you just want to take advantage of Vim, then select Evil mode.
Evil flagship - toggling between Emacs
C-z toggles between Vim states and the Emacs state when Evil Flagship editing states are used.
Here is the list of all the possible states, some of which are automatically applied (eg. magit git client is automatically evilified).
||purple||Evil - used to navigate read only buffers|
||blue||This state is like using a regular Emacs without Vim|
||chocolate||Evil - overwrites the character under point instead of inserting a new one|
||blue||Spacemacs - use Emacs state instead of the Vim insert|
||light brown||Spacemacs - an
||pink||Spacemacs - structural editing for Lisp code (and Clojure)|
||red||Spacemacs - navigate between multiple regions of text|
||red||Spacemacs - replace multiple regions of text|
Spacemacs state documentation
States and other concepts are explained further in the Spacemacs concepts documentation.
Transient State menusλ︎
Transient state menus make it simple to run commands multiple times, using a single key press, from a specific sub-set of commands.
For example, Font Scaling transient state menu allows you to repeatedly increase the size of the buffer font just by using the
+ key. The Font Scaling transient state menu contains the sub-set of commands related to scaling, so you can decrease the font size just with the
- key and reset the font with
Transient-states are usually triggered by using a keybinding with the following pattern:
<Leader> <group> . where group is the category the transient-state falls under.
When in a transient-state you will see documentation at the bottom of your window. To exit a transient-state press q.
Examples of transient state menusλ︎
|Keybindings||Transient state description|
||lisp state for structured editing|
||zoom frame size|
||Font Scaling (x for text)|
||Change the value of a number|