Spacemacs: emacs user’s ﬁrst impression
March 20, 2017
1 / 21
Who am I?
Doctoral student at Harvard T.H. Chan School of Public
Health (Epidemiology & Biostatistics).
Main use of emacs in R programming and LATEX(5 years?).
Recently started using org-mode.
2 / 21
What is spacemacs?
A community-driven Emacs distribution: "The best editor
is neither Emacs nor Vim, it’s Emacs and Vim!"
i.e., spacemacs is a bunch of emacs conﬁguration ﬁles
contributed by the community that transforms the vanilla
emacs to a "ready-to-use" system.
spacemacs is NOT a fork of emacs, it runs on the latest
3 / 21
How to install spacemacs
Nice looking website at http://spacemacs.org/
Github repo at
Quick start at
4 / 21
Installation: Wait, replacing .emacs.d!?
## Default installation method
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
The default installation methods assumes that you use
spacemacs as a drop-in replacement.
This is unlikely to be what existing emacs users want.
Recommendation is to back up the existing .emacs.d
and move it out of the way. It’s not ideal.
5 / 21
Run parallel instances of spacemacs and emacs
Clone the develop branch to ~/.spacemacs.d.
git clone https://github.com/syl20bnr/spacemacs -b develop ~/.spacemacs.d
Create an empty ~/.spacemacs ﬁle. This will be the
user-speciﬁc conﬁguration ﬁle. This seems to avoid
messing with the git repo.
These ﬁles are ignored by the regular emacs without an
6 / 21
In the emacs startup process, ~/.emacs has the highest
priority. (51.4.4 How Emacs Finds Your Init File)
We can conditionally load ~/*/init.el using ~/.emacs.
I used the name of the executable to use diﬀerent folder.
My .emacs (link; or ﬁnd kaz-yos on Gist)
Inspired by Running spacemacs alongside regular emacs
on emacs stack exchange.
7 / 21
First start up
Open Spacemacs.app if you are doing my trick.
You may experience this certiﬁcate issue. Just press A as
many times as it asks.
8 / 21
A lot of default packages are installed automatically.
9 / 21
SPC key rules!
As the name suggests, SPC serves as a preﬁx.
11 / 21
Some key bindings
SPC preﬁx to grouped commands. guide-key.el will
SPC SPC corresponds to M-x, but with the helm.el
SPC h help related preﬁx.
SPC h l help for layers available.
SPC h T Evil tutor
SPC f ﬁle related preﬁx.
SPC f f for helm-find-files.
SPC f e d for editing the ~/.spacemacs conﬁguration
SPC b buﬀer related preﬁx.
SPC b b helm-mini for choosing a buﬀer.
SPC b d kill-this-buffer
SPC a application related preﬁx.
SPC a d dired (C-RET to decide)
12 / 21
What is a layer?
A layer can be considered as a meta-package that
organizes multiple individual packages nicely.
SPC h l will list 150 available layers that are available
13 / 21
How a layer is implemented
"A conﬁguration layer is a directory containing at least a
packages.el ﬁle which deﬁnes and conﬁgures packages to
be downloaded from Emacs package repositories using the
package.el built-in feature of Emacs."
14 / 21
~/.spacemacs is for individual conﬁguration.
SPC SPC dotspacemacs/install overwrites
~/.spacemacs with the template.
SPC f e d (ﬁle/emacs/dotﬁle) opens this ﬁle for editing.
15 / 21
Put names of layers you want in the
activate the layer.
16 / 21
Layer example: git
If the git layer is added and the conﬁg ﬁle is sync’ed, SPC
g preﬁx is added.
17 / 21
Default settings are in the dotspacemacs/init part of
The most important decision here is
18 / 21
User conﬁguration beyond layers
User conﬁguration should be in these parts of
dotspacemacs/user-init loads before layers.
dotspacemacs/user-config loads after layers.
19 / 21
Migrating existing conﬁguration
A proper way to incorporate your pre-existing emacs
conﬁguration is to create a custom layer. But starting
from scratch may be a better way considering the way
20 / 21
Spacemacs is a distribution of emacs with nice defaults
and sophisticated layer-based conﬁguration.
If someone is coming to emacs for the ﬁrst time or
existing Evil mode user, spacemacs is highly
For someone with highly customized emacs conﬁguration,
the transition appears daunting.
I haven’t made the switch (yet?).
21 / 21