├── .emacs ├── README.md └── modules ├── php-mode.el ├── psvn.el └── saved-places /.emacs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogoscar/emacs/b87235f12a20c7886023cfc77d748fca9a089f75/.emacs -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # emacs 2 | My Emacs configuration file and three modules 3 | 我的Emacs配置文件和三个模块 4 | 5 | ## Containing four files: 6 | ## 包含四个文件: 7 | 8 | - .emacs 9 | - modules/php-mode.el 10 | - modules/psvn.el 11 | - modules/saved-places 12 | 13 | ## Usage 14 | ## 用法 15 | 16 | - Install Emacs first 首先需要安装Emacs 17 | - copy .emacs to ~ (your home folder) 把 .emacs 文件拷贝到你的家目录(~) 18 | - copy the folder module to ~/.emacs.d/ 把 modules 文件夹拷贝到你的家目录下面的.emacs.d 这个目录(~/.emacs.d/) 19 | 20 | 21 | ## Frequently used shortcuts 22 | ## 常用的快捷键组合 23 | 24 | 25 | M-s : 新建一个buffer(缓冲区) 26 | 27 | C-x O : 注意是大写的O,不是零,所以需要按住shift键再按o键。用于在缓冲区之间切换 28 | 29 | C-g : 取消当前操作 30 | 31 | C-x u : 回到上一步,相当于Undo 32 | 33 | C-x 3 : 把缓冲区(buffer)分为左右两个,新的一个缓冲区是复制当前的缓冲区 (可以执行多次,来分割出很多小窗口) 34 | 35 | C-x 2 : 把缓冲区(buffer)分为上下两个,新的一个缓冲区是复制当前的缓冲区 (可以执行多次,来分割出很多小窗口) 36 | 37 | M-w : 选中文字的情况是复制文字,而如果没有选中文字则是复制当前的一行 38 | 39 | C-w : 选中文字的情况是剪切文字,而如果没有选中文字则是剪切当前的一行 40 | 41 | M-x : 调出命令输入,可以在后面接命令,比如man,svn-status,等 42 | 43 | C-y : 黏贴 44 | 45 | C-x C-s : 保存文本 46 | 47 | C-x C-f : 打开文件,如果文件不存在,则新建文件 48 | 49 | C-x C-v : 打开一个文件,取代当前缓冲区 50 | 51 | C-x k : 关闭当前缓冲区(buffer) 52 | 53 | C-s : 向前搜索 54 | 55 | C-r : 向后搜索 56 | 57 | C-x h : 全选 58 | 59 | C-v : 向下翻页 60 | 61 | M-v : 向上翻页 62 | 63 | C-f : 前进一个字符 64 | 65 | C-b : 后退一个字符 66 | 67 | M-f : 前进一个单词 68 | 69 | M-b : 后退一个单词 70 | 71 | C-@ : 标记开始区域 72 | 73 | C-a : 移到行首 74 | 75 | C-e : 移到行尾 76 | 77 | M-a : 移到句首 78 | 79 | M-e : 移到句尾 80 | 81 | M-< : 缓冲区头部 82 | 83 | M-> : 缓冲区尾部 84 | 85 | M-g M-g,再输入数字 : 跳转到文本的第几行 86 | 87 | C-x 0 : 关闭当前缓冲区 88 | 89 | C-x C-c : 退出Emacs 90 | 91 | ## Etags用法: 92 | 93 | 94 | rm -f TAGS 95 | 96 | find . -name "*.cc" -print -or -name "*.h" -print -or -name "*.java" -print | xargs etags -a 97 | 98 | 99 | M-. 跳至定义处 100 | 101 | M-* 跳回 102 | 103 | C-u M-. 查找下一个tags 104 | 105 | M-TAB 自动补齐函数名 106 | 107 | 108 | **使用Shell时显示** 109 | 110 | "terminal is not fully functional" 111 | 112 | 修正: 113 | 114 | ```git config --global core.pager ""``` 115 | 116 | 改回原来: 117 | 118 | ```git config --global core.pager 'less -+F'``` 119 | -------------------------------------------------------------------------------- /modules/php-mode.el: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogoscar/emacs/b87235f12a20c7886023cfc77d748fca9a089f75/modules/php-mode.el -------------------------------------------------------------------------------- /modules/saved-places: -------------------------------------------------------------------------------- 1 | ;;; -*- coding: utf-8 -*- 2 | (("/home/enmingx/.emacs.d/todo/jjd.todo" . 32) 3 | ("/home/enmingx/.emacs.d/completions" . 342) 4 | ("/home/enmingx/.emacs" . 160)) 5 | --------------------------------------------------------------------------------