Emacs 快捷键
Table of Contents
窗口
- C-x 0 关闭当前窗口
- C-x 1 关闭其他窗口
- C-x 2 上下分屏
- C-x 3 左右分屏
- C-x o 移动到 other 窗口
- C-x 4 0 关闭当前的窗口和缓冲
- C-x 4 b 在另一个窗口打开文件
光标移动
- C-f C-b C-n C-p
- M-f 向前一个单词
- M-b 向后一个单词
- M-< 文件开头
- M-> 文件结尾
键盘布局
C-<tab>: undefined(spacemacs/alternate-buffer) C-q: quoted-insert C-w: kill-region C-e: move-end-of-line C-r: isearch-backward C-t: transpose-chars C-y: yank C-u: universal-argument C-i: indent-for-tab-command[tab] C-o: open-line C-p: previous-line C-[: [ESC] C-a: move-beginning-of-line C-s: isearch-forward C-d: delete-char C-f: forward-char C-g: keyboard-quit C-h: [prefix]help C-j: electric-newline-and-maybe-indent C-k: kill-line C-l: recenter-top-bottom C-z: suspend-frame C-x: [prefix] C-c: [prefix] C-v: scroll-up-command C-b: backward-char C-n: next-lien C-m: newline C-,: undefined C-.: undefined C-/: undo C-SPE: set-mark-command M-?: C-[ ? (M-? 更好按) M-q: fill-paragraph M-w: kill-ring-save M-e: forward-sentence M-r: move-to-window-line-top-bottom(much like C-l) M-t: (transpose-words) M-y: yank-pop M-u: upcase-word M-i: tab-to-tab-stop M-o: undefined M-p: undefined M-[: undefined M-a: backward-sentence M-s: symbols[prefix] M-d: kill-word M-f: forward-word M-g: goto[prefix] M-h: mark-paragraph M-j: default-indent-new-line M-k: kill-sentence M-l: downcase-word M-;: comment-dwim/eval-expression M-z: zap-to-char M-x: execute-extended-command M-c: capitalize-word M-v: scroll-down-command M-b: backward-word M-n: undefined M-m: back-to-indentation M-,: xref-pop-marker-stack M-.: xref-find-dfinitions M-?//: xref-find-references/dabbrev-expand M-<: beginning-of-buffer M->: end-fo-buffer C-M-?: C-[ C-? C-M-q: undefined C-M-w: append-next-kill C-M-e: end-of-defun C-M-r: isearch-backward-regexp C-M-t: transpose-sexps C-M-y: undefined C-M-u: backward-up-list C-M-i: complete-symbol C-M-o: split-line C-M-p: backward-list C-M-a: beginning-of-defun C-M-s: isearch-forward-regexp C-M-d: down-list C-M-f: forward-sexp C-M-g: undefined C-M-h: mark-defun C-M-j: default-indent-new-line C-M-k: kill-sexp C-M-l: reposition-window C-M-;/:: undefined/undefined C-M-'/": undefined/undefined C-M-z: undefined C-M-x: undefined C-M-c: exit-recursive-edit C-M-v: scroll-other-window C-M-b: backward-sexp C-M-n: forward-list C-M-m: M-RET undefined C-M-,/<: undefined/undefined C-M-./>: xref-find-apropos/undefined C-M-/: dabbrev-completion
- xref-find-dfinitios
- ✗ find the definition of the identifier at point
- xref-pop-marker-stack
- ✗ pop back marker-stack
- xref-find-apropos
- ✗ find all meaningful symbols tha match PATTERN
- M-u
- upcase-word
- M-l
- downcase-word
- M-c
- capitalize-word
C-<tab>: spacemacs/alternate-buffer C-q: quoted-insert C-w: kill-region C-e: mwim-end-of-line-or-code C-r: isearch-backward C-t: transpose-chars C-y: yank C-u: universal-argument C-i: indent-for-tab-command[tab] C-o: open-newline-above C-p: previous-line C-[: [ESC] C-\: window-operation C-a: mwim-beginning-of-line-or-code C-s: consult-line C-d: delete-char C-f: forward-char C-g: keyboard-quit C-h: [prefix]help C-j: electric-newline-and-maybe-indent C-k: kill-line C-l: open-newline-below C-z: undefined C-x: [prefix] C-c: [prefix] C-v: scroll-up-command C-b: backward-char C-n: next-lien C-m: newline C-,: goto-last-change C-.: undefined C-/: undo C-?: vundo C-SPE: set-mark-command M-?: C-[ ? (M-? 更好按) M-q: fill-paragraph M-w: kill-ring-save M-e: er/expand-region M-r: move-to-window-line-top-bottom(much like C-l) M-t: (transpose-words) M-y: consult-yank-pop M-u: upcase-word M-i: tab-to-tab-stop M-o: undefined M-p: vanillay/move-cursor-8-lines-up M-[: undefined M-a: backward-sentence M-s: symbol-overlay-put M-d: delete-block-forward M-f: forward-word M-g: goto-line-preview M-h: mark-paragraph M-j: default-indent-new-line M-k: kill-sentence M-l: downcase-word M-;: comment-dwim/execute-extended-command M-z: [prefix]cursor M-x: execute-extended-command M-c: capitalize-word M-v: scroll-down-command M-b: backward-word M-n: vanillay/move-cursor-8-lines-down M-m: back-to-indentation M-,: lsp-bridge-jump M-.: lsp-bridge-jumpback M-?//: lsp-bridge-find-ref/dabbrev-expand M-<: beginning-of-buffer M->: end-fo-buffer C-M-?: C-[ C-? C-M-q: undefined C-M-w: append-next-kill C-M-e: end-of-defun C-M-r: isearch-backward-regexp C-M-t: transpose-sexps C-M-y: undefined C-M-u: backward-up-list C-M-i: complete-symbol C-M-o: split-line C-M-p: backward-list C-M-a: beginning-of-defun C-M-s: isearch-forward-regexp C-M-d: down-list C-M-f: forward-sexp C-M-g: undefined C-M-h: mark-defun C-M-j: default-indent-new-line C-M-k: kill-sexp C-M-l: reposition-window C-M-;/:: undefined/undefined C-M-'/": undefined/undefined C-M-z: undefined C-M-x: undefined C-M-c: exit-recursive-edit C-M-v: scroll-other-window C-M-b: backward-sexp C-M-n: forward-list C-M-m: M-RET undefined C-M-,/<: undefined/undefined C-M-./>: xref-find-apropos/undefined C-M-/: dabbrev-completion
常用的 C-x – (C-x 很难按,所以这里的功能很多不常用,部分常用的记录在这里)
- C-x C-c 退出
- C-x C-s 保存
- C-x C-e eval-last-sexp
- C-x ( 宏开始
- C-x ) 宏结束
- C-x + balance window
- C-x h mark whole buffer
- C-x k kill buffer
- C-x C-w write file
- C-x C-u upcase region
- C-c C-x C-l 预览LaTeX
- 有关帮助的快捷键
- C-h t 打开新手帮助文档
- C-h k (find-function-on-key)查询按键
- C-h v (find-variable)查询变量
- C-h f (find-function)查询函数
- C-h m to open Major mode and minor mode
- C-g 撤销刚才的操作
- C-h t 打开新手帮助文档
- 复制粘贴
- C-@ 选中文本
- C-SPC 选中文本
- M-w 复制选中文本
- C-y 粘贴
- C-@ 选中文本
- 有关文件的快捷键
- C-x C-f 打开文件
- C-x C-s 保存文件
- C-c C-l 在 org-mode 下创建链接
- C-x C-f 打开文件
- dired
- + 创建一个文件夹
- C-x C-f 创建文件
- g 刷新
- R 重命名
- C 复制
- + 创建一个文件夹
- 移动
- M-r 中上下
- M-g M-g 行号 RET,跳到特定行
- M-r 中上下
## 其他原生快捷键(ctrl)
帮助
- ctrl h v 查看变量
- ctrl h k 查看按键绑定
- ctrl h m 查看major-mode
- ctrl h f 查看函数
- ctrl h w 查看函数绑定按键
- ctrl h e 查看message buffer
- ctrl h o 查看标志
- ctrl h d 查看文档
- ctrl h c 简短介绍按键功能
- ctrl h b 查看键绑定
- ctrl h i 教程
evil-normal-state
- ctrl a 前往行首
- ctrl b 上翻一页
- ctrl c +prefix
- ctrl d 下翻半页
- ctrl e 上移一行
- ctrl f 下翻一页
- ctrl g keyboard-quit
- ctrl h 帮助
- ctrl i evil-jump-forward
- ctrl j electric-newline-and-maybe-indent
- ctrl k 删除光标到行尾
- ctrl l recenter-top-bottom
- ctrl m 回车,部分 mode 有其他作用
- ctrl n evil-paste-pop-next
- ctrl o evil-jump-backward
- ctrl p evil-paste-pop
- ctrl q quoted-insert
- ctrl r redo
- ctrl s isearch
- ctrl t pop-tag-mark
- ctrl u 上翻半页
- ctrl v 可视块
- ctrl w +windows
- ctrl x +prefix
- ctrl y evil-scroll-line-up
- ctrl z evil-exit-emacs-state
evil-insert-state
- ctrl a 前往行首
- ctrl b 后退一个字符
- ctrl c +prefix
- ctrl d 删除前面一个字符
- ctrl e 前往行尾
- ctrl f 前进一个字符
- ctrl g keyboark-quit
- ctrl h 帮助
- ctrl i TAB
- ctrl j electric-newline-and-maybe-indent
- ctrl k 删除光标到行尾
- ctrl l recenter-top-bottom
- ctrl m RET
- ctrl n 下一行
- ctrl o 下面创建新行
- ctrl p 上一行
- ctrl q quoted-insert
- ctrl r isearch-backward
- ctrl s isearch
- ctrl t 交换当前字符与前一个字符
- ctrl u 重复插入
- ctrl v scroll-up-command
- ctrl w 删除前一个单词
- ctrl x +prefix
- ctrl y 粘贴
- ctrl z evil-exit-emacs-state