Spacemacs Rocks Note Day 11
2017-11-11
A series of notes that I learn Emacs hacking. Spacemacs installation and some introduction to layers, a read list and some tips.
Spacemacs!
Installation
Clone from Github. It is a set of configuration, so it is based on Emacs.
Rmember to backup the current configurations in ~/emacs.d.
1
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
In the first place, the system will ask which edit mode:
- Vim
- Emacs
Let’s choose vim. Yeah! I start to learn vim from scratch.
Second question, what distribution would you like to install
- Spacemacs (recommended)
- Spacemacs-base
The second one is more like a customized version with less packages installed.
Try leader key in evil-mode
SPC f e d: Go to the.spacemacsfile and jump touser-initsection=.SPC f j: opendired-modeand locate current file.SPC f e R: rerun the.spacemacsfile to make changes. We don’t need to restart Spacemacs from now on.SPC f e v: check the current version of Spacemacs.SPC q R: restart SpacemacsSPC h SPC <layer-name>: check what packages are installed for the given layer.SPC s s: gUseswiperto search in the document.F11: maximize the window.
Add some layers to Spacemacs
- Open
.spacemacs, find the functiondotspacemacs-configuration-layers. - Uncomment the layer we need, for example,
org,auto-complete,git,markdown,spell-checking,syntax-checkingetc. - Remember the layer is not packages. It is a set of packages.
To Read
Actually most of the stuff that shall be recorded here are already in the FAQ or documentation. Read them carefully if you want to master Spacemacs or maybe Emacs.
More tips
- All additional package should be put in
dotspacemacs-additional-packagesin the.spacemacsfile. - Search “exclude” on Emacs-China to find the list that may be potentially removed safely. Thus improve the start up performance.
- Before you can write your own layer, put all the config in
user-configfunction. - Find more available “official” layers on spacemacs Github repo, or Configuration layers.
- Some other example themes:
- spacemacs-dark
- spacemacs-light
- solarized-light
- solarized-dark
- leuven
- monokai
- zenburn
- A list of Spacemacs cheat sheet can be found robphoenix/spacemacs-cheshe.md.