spacemacs各种问题修复方法
快捷鍵操作時報 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:
需要python3????python3 -m pip install <pkg>
總結
以上是生活随笔為你收集整理的spacemacs各种问题修复方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: “虚受烧丹经”下一句是什么
- 下一篇: 先奇家用投影仪是不是杂牌?