Spacemacs安装
2024-09-06 18:07:21
为什么选择Spacemacs
Spacemacs是一个已经配好的Emacs和Vim,正如官网所说的The best editor is neither Emacs nor Vim, it's Emacs and Vim!
具体安装以及安装小建议
- 预先准备:需要先安装好
Emacs
和git
- 备份原先的配置
mv .emacs.d .emacs.d.bak
mv .emacs .emacs.bak
- 克隆仓库
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
github可能会连接比较慢,可以使用在国内的码云备份(每天同步一次)
git clone https://gitee.com/mirrors/spacemacs.git ~/.emacs.d
- (可选)切换分支
默认的分支是master
分支,经我本人的测试安装,Emacs版本是26.3时,使用develop
分支更好,切换分支的命令如下:
git checkout develop
- 初始化设置
emacs --insecure
将会进入emacs后要求选择编辑方式(vim或emacs)、标准版还是精简版
6. 安装所需要的包
如果你的网络情况比较好,那么只需要等待安装完成就好
如果网络情况不太好,可以考虑且换为国内源。具体切换方法如下:
- 先推出emacs,先按
Ctrl-g
再按Ctrl-x Ctrl-c
。 - 修改
.spacemacs
文件,找到defun dotspacemacs/user-init ()
函数,在函数中根据清华大学的镜像的帮助进行添加,要注意master
和develop
分支是不同的,添加后结果如下:
(defun dotspacemacs/user-init ()
"Initialization for user code:
This function is called immediately after `dotspacemacs/init', before layer
configuration.
It is mostly for variables that should be set before packages are loaded.
If you are unsure, try setting them in `dotspacemacs/user-config' first."
(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/")))
)
- 修改镜像后,重新启动emacs,等待安装结束即可
安装结果
Spacemacs启动后的首页如下:
最新文章
- nfs部署和优化
- git 和 github 关系?
- error_reporting()
- bzoj 3196 树套树模板
- 高亮代码显示之HTML困惑
- Orchard 刨析:Caching
- knockout——官网demo
- Front-end Developer Interview Questions
- C# Json时间类型的转换
- 解析XML文档之一:使用SAX解析
- jquery 效果
- BootStrap 智能表单系列 十一 级联下拉的支持
- 2018-2019-2 20165205 Exp2 后门原理与实践
- macs 学习
- windbg无故不显示command窗口
- MyBatis 源码分析 - 内置数据源
- STM32 堆栈使用解析
- Android Studio插件之MVPHelper,一键生成MVP代码
- mybatis大框架
- Zabbix监控主动模式