spacemacs 是什么?
“Spacemacs is a new way to experience Emacs – a sophisticated and polished set-up focused onergonomics, mnemonics and consistency.”
简而言之,spacemacs 就是给你提供一套功能强大、易于扩展的开箱即用配置,使你基本不需要折腾也可以享受使用 emacs 的快感。So,come on,折腾起来吧!
以下是我的基本环境:
emacs 版本 : emacs 25.2
系统 : ubuntu-MATE 18.10
python : python 3.7.1( anaconda3 )
0x01 安装与基本配置
spacemacs 的安装非常简单,直接将 github 的仓库克隆的家目录的 .emacs.d 目录就可以了
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
之后重启 emacs 时就会自动安装了。安装过程建议选择 vim 跟 helm。
spacemacs 在安装过程中会在家目录下创建 .spacemacs 文件,如果下载插件速度太慢,可以考虑使用清华镜像源,具体使用方法如下:
添加下面的代码到 .spacemacs 的 dotspacemacs/user-init()
(setq configuration-layer--elpa-archives
'(("melpa-cn" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")
("org-cn" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/org/")
("gnu-cn" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")))
其他国内的镜像也可以,添加方法与上面一样。
0x02 spacemacs 配置文件结构
.spacemacs 的基本结构如下图:
可以看到整个文件主要由 4 个函数组成&