Install
Install Soure Code Pro
wget https://github.com/adobe-fonts/source-code-pro/archive/2.030R-ro/1.050R-it.tar.gz |
Install Spacemacs
git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d |
Add China Mirror: emacs-china.org
Basic Configuration
Layers
- themes-megapack
Python
Edit Python
Edit python with virtual environment by Spacemacs.
- Create a virtual environment:
virtualenv -p python3 venv
- Install pre-requisite package in the virtual environment:
source venv/bin/activate
pip install anaconda-mode - When we edit python with virtual environment by Spacemacs, we muste activate the virtual environment in Spacemacs, run following shortcut key could choose the virtual environment directory:
M-x
-pyvenv activate
, V a
SPC m V a
- Yapf for Emacs
Yapfify uses yapf to format a Python buffer. It can be called explicitly on a certain buffer, but more conveniently, a minor-mode ‘yapf-mode’ is provided that turns on automatically running YAPF on a buffer before saving. Run following shortcut key:M-x
-yapfift-buffer
, =
SPC m =