spaces的坑

spacemacs的坑,改鏡像源,不能使用退格

emacs25以上能夠裝spacemacsgit

目前在mac上裝emacs26.1
使用spacemacs的時候會有melpa.org訪問慢或者訪問不了的問題
使用國內代理github

[url]https://mirrors.tuna.tsinghua.edu.cn/help/elpa/[/url]vim

裝好emacs26以後安裝spacemacs

cd ~
git clone https://github.com/syl20bnr/spacemacs .emacs.d
修改
vim .emacs.d/core/templates/.spacemacs.template


(defun dotspacemacs/user-init ()
  "Initialization function for user code.
It is called immediately after `dotspacemacs/init', before layer configuration
executes.
 This function is mostly useful for variables that need to be set
before packages are loaded. If you are unsure, you should try in 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/")))
  )



主要在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/")))

啓動emacs
第一次會選基本信息
會選基本配置
emacs
base
helm
服務器

觀察 ~/.spacemacs中的user-init下面也相應的多了幾行配置網絡

使用emacs -nw
打開就不會有卡頓的問題了ssh

不能使用退格

我在調試 spacemacs 的時候,發如今 emacs 裏只要按退格鍵 backspace ,就會自動調用 C-h 幫助指令,百思不得其解,google 之後,在 emacs 的文檔裏找到這個問題的答案, Fails to Delete」>emacs文檔,我在 init.el 里加上了 ( normal-erase-is-backspace-mode 1 )之後,退格鍵就可使用了,至此,emacs 已經算基本可使用了,若是是在服務器上使用我以爲這樣就能夠了,由於畢竟在服務器上使用的時候比較少,通常也是小改改代碼什麼的,不必再花精力配置 emacs 了。不過我仍是做死搞了一下 spacemacs。網站

首次啓動 spacemacs 時,它會從網絡下載一系列擴展包,放置於 ~/.emacs.d/elpa 文件夾下。同時,它會提供幾個簡單的選項,用於初始化 ~/.spacemacs 配置文件。這個配置文件有幾個地方值得注意。google

dotspacemacs-configuration-layers 是啓用的 layer 列表。初始列舉的 layer 大多被雙引號註釋掉了,你能夠移除註釋使用它們,同時自行添加其餘的 layer。必定要啓用 auto-completion 和 heml,它們是 spacemacs 的靈魂所在。另外可以使用 themes-megapack 下載各種皮膚。url

dotspacemacs-editing-style 是默認編輯模式。evil mode 對應的值爲 'vim。evil mode 的詳解請見後續文章。spa

dotspacemacs-themes 用於設置皮膚。我我的最喜歡farmhouse-dark。想挑皮膚去 這個網站 就行了。

dotspacemacs-maximized-at-startup 在啓動時自動最大化窗口。把這個值設置爲 t 以得到沉浸式的編輯體驗。若想要全屏運行 spacemacs,請改寫 dotspacemacs-fullscreen-at-startup。

dotspacemacs-line-numbers 設置是否顯示行號。nil隱藏,t則顯示出來。

dotspacemacs-whitespace-cleanup 刪除多餘的空白,推薦設置爲'trailing。

關於 spacemacs 的更多設置有待我進一步挖掘。

若是你只想在終端內運行 spacemacs 而不打開新的窗口,emacs -nw 能夠知足你的需求。除了用 unicode 字符代替了精細的圖標外,終端版的 spacemacs 與 GUI 版沒有本質不一樣。ssh 和 tmux 的用戶這回不會失望了

相關文章
相關標籤/搜索