git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
pacman -S emacs
.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/")))
新建文件python
spc f f
e path
保存編輯linux
spc f s
:w
關閉 buffergit
spc b d
安裝對應的語法擴展github
Dired
(file or directory navigator)shell
spc a d
啓動 Dird
經常使用操做編程
/
Enter
shift c
shift r
shift d
!
buffer
vim
spc Tab
返回上一緩衝區spc b b
顯示緩衝區列表,enter
可進入spc b d
關閉緩衝區windows
windows
spc w -
上下劃分spc w /
左右劃分移動窗口ssh
spc num
,num爲窗口標號spc w h/j/k/l
,上下左右移動C w h/j/k/l
,上下左右移動spc w d
關閉窗口Projectile
參考函數
spc p f
打開文件git respotitory
會被識別爲工程文件search text
/
vim 方式檢索spc s g p
project中spc s g g
當前文件中查找spc /
同上spc *
多文件中 查找 光標下的單詞spc s g b
在buffers 查找spc s g
下的菜單Magic git
install
.spacemacs
文件,dotspacemacs-configuration-layers
,uncomment git
;:w
保存; spc f e R
更新文件基礎操做
spc g s
開啓magit-status
g r
更新目錄提交狀態commit
git add
:光標移動到指定文件處,s
commit
:c c
, c
提交l l
顯示提交記錄enter
顯示提交細節branch
b c
建立新的分支b b
移動新的分支m m
合併分支b x
刪除分支remote repo
magit-status
下M a
輸入ssh
地址,https
不太方便,老是讓輸入用戶名,密碼P p
pushF p
pull:magit-clone xxxx
克隆遠程倉庫squash commit
r i
啓動 rebaseC-c C-c
s
, c
編輯提交信息,便可Neotree
spc f t
打開 neotree 窗口spc 0
移動到左側樹形窗口j or <down>
: move blowk or <up>
:move upEnter
open file or directoryR
將光標處文件夾設爲根目錄K
將根目錄設爲上層目錄spc p t
將當前工程目錄設爲根目錄org-mode
.spacemacs
,取消 org
註釋,spc f e R
安裝軟件包Tab
open or collapse title.Todolist
t
來改變Todolsit
:變爲todo;變todo爲done;變todo爲open;, s
,進行scheduled
,設置開始時間agenda file
.spacemacs
中 user-config
添加 .org
路徑;spc f e R
更新;spc a o o
根據命令面板,顯示相應的信息(agenda 表示scheduled
)t
更新條目對應狀態shell
:ansi-term
運行系統shell:eshell
運行spacemacs
自帶的shell,能夠執行lisp語句.spacemacs
中dotspacemacs-configuration-layers
部分取消對shell
部分的註釋。
spc '
打開小型的shell(linux 默認的shell)在以下片斷設置默認的shell,eshell
爲emacs的shell,shell
爲系統默認shell
(shell :variables shell-default-shell 'eshell shell-default-height 30 )
spc p '
在當前工程根目錄打開shellcolor theme
配置顏色主題
dotspacemacs-configuration-layers
中添加themes-megapack
,spc f e R
更新(時間較長)spc T s
預覽theme,theme預覽網址 dotspacemacs-theme
處配置一次編輯多行
visual-mode
v
進入visual-mode
Ctrl + v
進入 visual-block
j
向下移動選中多行I
返回第一行進行同步修改ESC
應用修改到多行IEDIT
spc s e
進入IEDIT-state
n
, N
)移動到選中的字段,使用TAB
鍵能夠激活/取消激活選中字段I
進入編輯模式F
將搜索限制在單個函數中配置:dotspacemacs-configuration-layers
python
auto-completion
syntax-checking
快捷鍵:
REPL(Read-Eval-Print Loop) "讀取-求值-輸出" 循環
交互式編程環境
spc m s i
開啓交互式編程環境spc m s b
REPL運行當前窗口代碼並獲取其上下文。spc m s B
相似spc m s f
將單個函數放入REPLlive coding
(好像不支持 if __name__ == "__main__"
)根據改動實時執行代碼
spc m l
啓動/關閉 live coding