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