快捷键操作时报 tr不是内部命令
------说明是缺少tr命令,win10可以安装coreutils for gnuwin32工具集,然后把bin目录加到系统path路径即可
没有ispell, flycheck error
------缺少ispell命令,windows下面用aspell替换,需要安装msys2的mingw64,然后用pacman安装aspell,然后在.spacemacs文件中修改
user-config,添加一下内容(或者把mingw64安装目录的etc/mingw64/bin加入path环境变量)
(add-to-list 'exec-path "d:/software/msys2/mingw64/bin")
(setq ispell-program-name "aspell")
(setq ispell-personal-dictionary "d:/software/msys2/mingw64/lib/aspell-0.60/en_GB")
打开.spacemacs里面的layers里面的org后启动emacs报org错误
------找到.emacs.d目录,然后删除elpa目录里面的projectile-xxxxxx文件夹,然后重启emacs即可
wrong type value: commandb, helm-do-xxx
------将msys2\usr\bin路径加入Path环境变量,需要用bin里面的grep命令
no such file or directory: helm-org
------ dotspacemacs-additional-packages '(helm-org) 增加helm-org包
invalid coding system utf-8 specified
------ (define-coding-system-alias 'UTF-8 'utf-8) 加入到.spacemacs的user-config中
将c编辑器的tab修改为4个空格
------ 在.spacemacs的user-config中加入
(setq c-basic-offset 4)
- warning:spacemacs默认字体”Source Code Pro”不存在。
解决方法如下:将 Source Code Pro 改为 Courier New 即可
推荐方法是:首先是下载Source Code Pro字体,github上的比较慢,下面网址的很快
http://www.fontsquirrel.com/
然后/usr/share/fonts/ 下新建一个目录
sudo mkdir /usr/share/fonts/opentype
接着解压下载的字体到该目录下,然后执行
sudo fc-cache -f -v 使字体生效
-
win10缺少clang支持
LLVM Download Page,安装即可 -
符号定义和引用跳转缺失
开启gtags layer,创建default的tags即可 -
修复spacemacs打开文件慢的问题
(setq inhibit-compacting-font-caches t) -
projectile打开文件列表慢的问题(spc p f)
(setq projectile-enable-caching t) 从第二次开始就会变快,第一次需要初始化缓存 -
projectile忽略不需要的文件目录的办法,避免文件过多查找慢
官方添加ignore files的方法:在工程根目录添加一个.projectile文件,然后在里面添加
-/log -/tmp -/vendor -/public/uploads 官方文档如下: http://projectile.readthedocs.io/en/latest/usage/ 31 -
工程比较大的时候spc s p会比较慢,还会卡死
搜索工具会按照这个优先级使用搜索命令,默认ag是不安装的,
需要安装silverxxx-ag工具来添加ag命令。ag比grep要快很多,如果ag的速度还不够,需要改用rg,rg可以使用color-rg,
速度比ag还要快,下载地址:https://github.com/manateelazycat/color-rg,下载后放在private目录
或者更改到develop分支,develop分支的search-tools最高优先级为rg -
emacs源更新慢,卡在启动下载界面
master 分支
添加下面的代码到
.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/")))
develop 分支
使用
configuration-layer-elpa-archives
代替原来的configuration-layer--elpa-archives
(--
换成-
)(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/")))
-
工程比较大的时候,spc p f显示文件列表很慢,是因为用git或者find慢,加速方法
使用spc f L, 用locate命令helm-locate. helm-projectile-find-file有native和alien两种方式,如果工程根目录下有.git目录并且仅有这一个,那么默认用git命令,并且可以忽略gitignore和.projectile里面忽略的目录文件;否则会用find命令查找,前面的忽略方式就没用了 -
启动emacs时报错:symbol is xxxx(函数名)
一般出现这种问题是.emacs.d elpa目录下的某些xx.elc文件跟当前的emacs版本不匹配, 可以找到类似名称的elc文件删掉, 或者暴力删掉所有的elc文件,之后重启 -
emacs内部无法切换系统的中文输入法
在/etc/environment文件中追加export LC_CTYPE="zh_CN.UTF-8"
执行sudo locale-gen
重启
或者用另一个方法:在~/.profile里面添加export LC_CTYPE=zh_CN.UTF-8 保存即可 -
windows平台用spacemacs develop分支, 报ls-lisp-use-insert-directory-program is nil
在.spacemacs文件中的defun dotspacemacs/init () 的 setq-default 中添加 ls-lisp-use-insert-directory-program t 即可 -
安装cmake-language-server:
需要python3python3 -m pip install <pkg>