参考 spacemacs 配置定制的个人在使用的 emacs 配置文件,主要适配 go 语言开发环境,采用 evil 模拟 vim 按键。
1. git clone https://github.com/lkzz/emacs.d ~/.emacs.d
2. make install
- golang,c++,elisp,rust,lua,python
- json,yaml,toml,markdown
- bazel,protobuf
- lsp-mode
- company
- company-box
- company-english-helper
- flycheck
- avy-flycheck
- flycheck-posframe
- maigt
- smerge
- diff-hl
- git-timemachine
- youdao dictionary
- pyim
- cal-china-x
- dired
- neotree
- ace-window
- golden-ratio
- resize-window
- centered-window
- window-numbering
主要参考 spacemacs 的按键绑定方式,详细快捷键如下:
- evil
Key Binding Description leader-key a
mwim-beginning-of-code-or-line
leader-key w
evil-write
leader-key W
evil-write-all
leader-key q
evil-quit
leader-key d
kill word
leader-key y
copy word
leader-key p
paste word
C-w
evil-delete-backward-word
- tab
Key Binding Description leader-key tt
awesome-tab-switch-group
leader-key ta
awesome-tab-select-beg-tab
leader-key te
awesome-tab-select-end-tab
leader-key th
awesome-tab-move-current-tab-to-left
leader-key tl
awesome-tab-move-current-tab-to-right
leader-key tn
awesome-tab-forward
leader-key tp
awesome-tab-backward
- window
Key Binding Description SPC wo
switch other window
SPC wz
zone window
SPC wr
resize window
SPC wt
toggle two split window
SPC wd
delete window
SPC wD
delete other window
SPC w/
split window right and focus
SPC w-
split window below and focus
SPC w1
select window 1
SPC w2
select window 2
SPC w3
select window 3
SPC w4
select window 4
- toggle
Key Binding Description SPC tb
toggle scroll bar
SPC td
toggle darkroom
SPC tf
toggle fullscreen
SPC tg
toggle golden ratio mode
SPC ti
toggle imenu
SPC tn
toggle neotree
SPC ts
toggle symbol overlay mode
SPC tt
toggle truncate line
SPC t'
toggle eshell
- bookmark
Key Binding Description SPC ms
bookmark-set
SPC mr
bookmark-rename
SPC md
bookmark-delete
SPC mj
helm-filtered-bookmarks
SPC ml
bookmark-bmenu-list
- buffer
Key Binding Description SPC bb
ivy switch buffer
SPC bc
clent buffer
SPC be
eval buffer
SPC bd
kill this buffer
SPC bD
kill other buffer
SPC bk
kill buffer
SPC bl
ibuffer list buffer
SPC bm
kill all buffer
SPC bn
switch to next buffer
SPC bp
switch to prev buffer
SPC bs
save buffer
SPC bg
revert buffer
- cursor move
Key Binding Description C-a
mwim-beginning-of-line
C-e
mwim-end-of-code-or-line
SPC jc
ivy goto char
SPC jd
dired jump
SPC jf
jump beginning of function
SPC jl
avy goto line
SPC jm
jump match delimiter
SPC jp
goto-match-parent
SPC jw
ivy goto word
- comma keybindings
Key Binding Description , d
delete word
, y
copy word
, p
cover word
, fd
xref find definitions
, fr
xref find reference
, ff
find file at point
, fs
xref find apropos
- other
Key Binding Description C-c y
youdao directory search
C-\
pyim
SPC s/
counsel rg search
SPC ss
swiper isearch
SPC fi
counsel recentf
SPC ff
counsel open file
SPC fi
open emacs init.el
s-0
text scale reset
s-=-
text scale increase
s--
text scale decrease