归档 | 首页
回到顶部 Back to Top

Emacs快捷键

目录

全局设置

默认设置

 1: C-x C-f     打开/新建文件
 2: C-x C-s     保存当前缓冲区
 3: C-x C-w     当前缓冲区另存为
 4: C-x s       存储所有buffer
 5: C-x C-v     关闭当前Buffer并打开新文件
 6: C-x i       光标处插入文件
 7: C-x b       切换Buffer
 8: C-x C-b     显示Buffer列表
 9: C-x k       关闭当前Buffer
10: C-x C-c     关闭Emacs
11: C-x u       Undo
12: C-/         Redo
13: M-r         页首页中页尾
14: M-g g       转到行
15: C-x r t     注释
16: C-x r k     反注释

自定义设置

(global-set-key [f1] 'split-window-horizontally)
(global-set-key [C-f1] 'split-window-vertically)
(global-set-key [f2] 'find-file)
(global-set-key [C-f2] 'find-file-other-window)
(global-set-key [f3] 'delete-other-windows)
(global-set-key [C-f3] 'delete-window)
(global-set-key [M-f3] 'kill-buffer)
(global-set-key [f4] 'other-window)
(global-set-key [f5] 'switch-to-buffer)
(global-set-key [C-f5] 'display-buffer)
;(global-set-key [(C-f5)] 'switch-to-buffer-other-window)
(global-set-key [f6] 'enlarge-window)
(global-set-key [C-f6] 'shrink-window)
(global-set-key [M-f6] 'balance-windows)
(global-set-key [f7] (lambda () (interactive) (term "/bin/bash")))
;(global-set-key [C-f7] (lambda ()(interactive)(split-window-horizontally)(term "/bin/bash")))
;(global-set-key [M-f7] (lambda ()(interactive)(split-window-vertically)(term "/bin/bash")))
(global-set-key [C-f8] 'save-buffer)
(global-set-key [M-f8] 'save-some-buffers)
(global-set-key [f9] 'enlarge-window-horizontally)
(global-set-key [C-f9] 'shrink-window-horizontally)
(global-set-key [f11] 'sr-speedbar-toggle)
(global-set-key [C-f11] 'dired)
(global-set-key [M-f11] 'speedbar)
(global-set-key [f12] 'undo)
;(global-set-key [C-f12] 'load-file ~/.emacs)
(global-set-key [C-f12] (lambda () (interactive)(load-file "~/.emacs")))
(global-set-key [up] 'windmove-up)
(global-set-key [down] 'windmove-down)
(global-set-key [left] 'windmove-left)
(global-set-key [right] 'windmove-right)
;(global-set-key [M-up] 'previous-buffer)
;(global-set-key [M-down] 'next-buffer)
(global-set-key (kbd "C-c q") 'auto-fill-mode)

模式设置

org-mode 默认设置

C-c a org-agenda
C-c c org-capture
C-c C-w refile
C-c . org-timestamp
C-c ! org-timestamp-inactive
C-c C-d org-deadline
C-c C-s org-scheduled
S-LEFT org-timestamp-down-day
S-RIGHT org-timestamp-up-day
M-LEFT 删除光标所在的列
M-S-UP 删除光标所在的行

org-mode 自定义设置

C-c p 发布站点
C-c f 发布当前文件

python-mode

插件快捷键

awesome-tab key binding

(global-set-key [C-left] 'awesome-tab-backward-tab)
(global-set-key [C-right] 'awesome-tab-forward-tab)

ivy key binding

;(global-set-key (kbd "C-s") 'swiper)
(global-set-key (kbd "M-x") 'counsel-M-x)
;(global-set-key (kbd "C-x C-f") 'counsel-find-file)
(global-set-key (kbd "C-x C-b") 'counsel-ibuffer)

作者 © YoursAF

最后更新: 2022-12-26 一 10:21

Built with Emacs 29.3 (Org mode 9.7.18)

冀ICP备17032034号-1