`
jimmy.shine
  • 浏览: 392956 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Emacs的快捷键

阅读更多
cpp 代码
 
  1. 直接用文件名打开文件  
  2.   
  3.   filecache 包提供了直接用文件名打开文件的方法,不用关心文件在那个目录里  
  4.   面。在打开文件时,minibuffer 中按 C-tab,直接打开相应文件。  
  5.   
  6.   (eval-after-load "filecache"  
  7.    '(progn (file-cache-add-directory-using-find "~/projects")  
  8.            (file-cache-add-directory-list '("~/work" "~/work/proj1" "~/work/proj2"))  
  9.            (file-cache-add-file-list (list "~/foo/bar" "~/baz/bar"))))  
  10.   
  11.   (define-key minibuffer-local-completion-map [C-tab] 'file-cache-minibuffer-complete)  
  12.   (define-key minibuffer-local-map [C-tab] 'file-cache-minibuffer-complete)  
  13.   (define-key minibuffer-local-must-match-map [C-tab] 'file-cache-minibuffer-complete)  
  14.   
  15. ----  
  16. 修改文件名补全后缀  
  17.   
  18.   (setq completion-ignored-extensions  
  19.         (append '(".bin" ".ext" ".free")  
  20.                 completion-ignored-extensions))  
  21.   (delete ".log" completion-ignored-extensions)  
  22.   
  23. ----  
  24. 在 Windows XP 上使用的字体  
  25.   
  26.   (create-fontset-from-fontset-spec  
  27.     (concat  
  28.      "-*-Courier New-normal-r-*-*-13-*-*-*-c-*-fontset-chinese,"  
  29.      "chinese-gb2312:-*-MS Song-normal-r-*-*-14-*-*-*-c-*-gb2312*-*"))  
  30.   (create-fontset-from-fontset-spec  
  31.     (concat  
  32.      "-*-Courier New-bold-r-*-*-13-*-*-*-c-*-fontset-chinesebold,"  
  33.      "chinese-gb2312:-*-MS Song-bold-r-*-*-14-*-*-*-c-*-gb2312*-*"))  
  34.   (setq default-frame-alist  
  35.     '((font . "fontset-chinese")))  
  36.   (set-face-font 'bold "fontset-chinesebold")  
  37.   
  38. ----  
  39. pop up marks  
  40.   
  41.   (global-set-key "\C-z" 'set-mark-command)  
  42.   (global-set-key "\C-x\C-p" 'pop-global-mark)  
  43.   
  44.   C-u C-z   cycle in local buffer mark ring.  
  45.   C-x C-p   cycle in global mark ring.  
  46.   
  47. ----  
  48. 工具栏添加 LaTeX 文档的章节索引  
  49.   
  50.   使用 AUCTeX 和 RefTeX 编辑 LaTeX 文件时,如果你喜欢用鼠标,不妨试试这个,  
  51.   可以在工具栏添加一个“Index”菜单,直接在你的章节之间跳转。  
  52.   
  53.     M-x imenu-add-menubar-index 或者  
  54.     (setq reftex-load-hook (quote (imenu-add-menubar-index)))  
  55.     (setq reftex-mode-hook (quote (imenu-add-menubar-index)))  
  56.   
  57. ----  
  58. 退出 picture mode 可以用 C-c C-c  
  59.   
  60.   据说是一个没有文档的键。  
  61.   
  62. ----  
  63. find tags  
  64.   
  65.   M-.           find-tag  
  66.   C-M-.         find-tag-regexp  
  67.   
  68.   C-x 4 .       find-tag-other-window  
  69.   C-x 5 .       find-tag-other-frame  
  70.   
  71. ----  
  72. sexp operate  
  73.   
  74.   backward-kill-sexp            M-C-BACKSPACE  
  75.   backward-sexp                 C-M-b  
  76.   eval-last-sexp                C-x C-e  
  77.   eval-print-last-sexp          M-x eval-print-last-sexp RET  
  78.   forward-sexp                  C-M-f  
  79.   indent-pp-sexp                M-x indent-pp-sexp RET  
  80.   indent-sexp                   M-x indent-sexp RET  
  81.   kill-sexp                     C-M-k  
  82.   last-sexp-toggle-display      M-x last-sexp-toggle-display RET  
  83.   mark-sexp                     C-M-SPC, C-M-@  
  84.   pp-eval-last-sexp             M-x pp-eval-last-sexp RET  
  85.   raise-sexp                    M-x raise-sexp RET  
  86.   transpose-sexps               C-M-t  
  87.   
  88. ----  
  89. Abbrev misc  
  90.   
  91.   M-'           abbrev-prefix-mark  
  92.   C-x '         expand-abbrev  
  93.   C-M-/         dabbrev-completion  
  94.   
  95. ----  
  96. 分栏编辑  
  97.   
  98.   C-x 6         2C-command  
  99.   C-x 6 s   2C-split  
  100.   C-x 6 b   2C-associate-buffer  
  101.   C-x 6 2   2C-two-columns  
  102.   
  103. ----  
  104. 调整窗口  
  105.   
  106.   C-x +         balance-windows  
  107.   C-x -         shrink-window-if-larger-than-buffer  
  108.   
  109. ----  
  110. 不太常用,但比较有用的键  
  111.   
  112.   C-x TAB       indent-rigidly  
  113.   M-^           delete-indentation  
  114.   
  115.   C-x C-n       set-goal-column  
  116.   C-x ;         comment-set-column  
  117.   
  118.   C-x <         scroll-left  
  119.   C-x >         scroll-right  
  120.   C-x [         backward-page  
  121.   C-x ]         forward-page  
  122.   
  123.   C-x l         count-lines-page  
  124.   C-x =         what-cursor-position  
  125.   
  126.   C-M-S-v       scroll-other-window-down  
  127.   
  128.   Register&Bookmark:  
  129.   C-x r l       bookmark-bmenu-list  
  130.   C-x r r       copy-rectangle-to-register  
  131.   C-x /         point-to-register-compatibility-binding  
  132.   C-x g         insert-register-compatibility-binding  
  133.   C-x j         jump-to-register-compatibility-binding  
  134.   C-x x         copy-to-register-compatibility-binding  
  135.   M-r           move-to-window-line  
  136.   
  137. ----  
  138. 不太常用,但没什么用的键  
  139.   
  140.   C-x C-d       list-directory  
  141.   C-x C-r       find-file-read-only  
  142.   C-x i         insert-file  
  143.   C-x LEFT      prev-buffer  
  144.   C-x RIGHT     next-buffer  
  145.   M-g           facemenu-keymap  
  146.   
  147. ----  
  148. 用某个编码重新加载文件  
  149.   
  150.   C-x C-m r ... RET    (revert-buffer-with-coding-system)  
  151.   
  152. ----  
  153. GNU Emacs (CVS) 的键盘宏(keyboard macro)  
  154.   
  155.   CVS 中的 Emacs 增加了一个 kmacro 包,扩展了原来的键盘宏的功能,增加了内  
  156.   置的计数器、键盘宏单步执行工具、用 kmacro-ring 保存多个宏。  
  157.   
  158.   C-x C-k SPC “调试”定义的宏很方便。  
  159.   
  160.   C-x C-k {C-p,C-n,C-v}+ 选定要执行的宏之后,按 {C-k}+ 就执行了,还可以再  
  161.   按{C-p,C-n}+ 再选定,再执行;{C-d} 删除选定的宏。  
  162.   
  163.   C-x C-k {C-m,RET,C-e} 相当于原来的 C-x C-k,直接编辑最后一个定义的宏。  
  164.   
  165.   定义键盘宏时,用 C-x q 来提示是否继续,用 C-u C-x q 可以输入任意的内容  
  166.   (C-M-c 退出递归编辑)。  
  167.   
  168.   C-x C-k b 可以把刚刚定义的宏绑定到一个键上,默认的 [0-9A-Z] 用来绑定相  
  169.   应的 C-x C-k [0-9A-Z]。  
  170.   
  171.   C-x C-k r 在 region 中执行宏。  
  172.   
  173.   C-x C-k n 命名最后一个定义的宏。命名之后,可以用 M-x insert-kbd-macro  
  174.   保存到文件,以便以后使用。  
  175.   
  176.   F3 可以象 C-x ( 一样开始键盘宏的定义,也可一象 C-x C-k C-i 一样插入内置  
  177.   计数器的值。F4 可以象 C-x ) 一样结束宏的定义,也可以象 C-x e 一样调用宏。  
  178.   
  179.   键盘宏的内置计数器:  
  180.   
  181.     C-x C-k {C-i,TAB} 插入计数器的值,每次插入都增加1或前缀参数大小;  
  182.     C-x C-k C-a 增加计数器的值,提示输入或前缀参数大小;  
  183.     C-x C-k C-c 设置计数器的值,提示输入或前缀参数大小;  
  184.     C-x C-k C-f 设置插入计数器值的格式。  
  185.     
  186.   from emacswiki:  
  187.     想定义宏的时候不需要 C-x ( ... C-x ),只须做一遍你的宏,然后用 C-x  
  188.     C-k l,从中去掉不要的内容,添一个名字和绑定的键,最后 C-c C-c。   
  189.   
  190. ----  
  191. 添加自己的关键字  
  192.   
  193.   font-lock-add-keywords  
  194.   
  195.    (font-lock-add-keywords 'c-mode  
  196.     '(("\\<\\(FIXME\\):" 1 font-lock-warning-face prepend)  
  197.       ("\\<\\(and\\|or\\|not\\)\\>" . font-lock-keyword-face)))  
  198.   
  199. ----  
  200. 有选择查看:selective-display  
  201.   
  202.   比如这个文件,用  
  203.   
  204.     M-1 C-x $  
  205.   
  206.   则只显示每一条的主题,省略内容  
  207.   
  208.     ,----[ M-1 C-x $ ]  
  209.     | ----  
  210.     | 修改 Emacs 的错误提示音  
  211.     | ...  
  212.     | ----  
  213.     | 生成 Emacs 对话框  
  214.     | ...  
  215.     | ----  
  216.     | 这样移动缓冲也不错  
  217.     | ...  
  218.     | ----  
  219.     | keywiz 游戏  
  220.     | ...  
  221.     `----  
  222.   
  223.   实际上是通过缩进量,对“行”选择.只显示行首在某列以内的行  
  224.   
  225.   M-2 C-x $  行首在前 2 列内的  
  226.   M-4 C-x $  行首在前 4 列内的  
  227.   C-x $      取消  
  228.   
  229. ----  
  230. 修改 Emacs 的错误提示音  
  231.   
  232.   (set-message-beep 'silent)  
  233.   
  234.   系统:   'asterisk, 'exclamation, 'hand, 'question, 'ok  
  235.   无声:   'silent  
  236.   机器喇叭:nil  
  237.   
  238. ----  
  239. 生成 Emacs 对话框  
  240.   
  241.   (if (yes-or-no-p "Are you feeling well? ")  
  242.        (message "You appear to be feeling well.")  
  243.     (message "Hope you will get better soon!"))  
  244.    
  245.   (if (x-popup-dialog t '("Are you feeling well?" ("Yes" . t) ("No" . nil)))  
  246.       (message "You appear to be feeling well.")  
  247.     (message "Hope you will get better soon!"))  
  248.   
  249. ----  
  250. 这样移动缓冲也不错  
  251.   
  252.   随时移动,不需要 view mode,可惜是需要上下键:  
  253.   (global-set-key [M-down] '(lambda () (interactive) (scroll-up   1)))  
  254.   (global-set-key [M-up]   '(lambda () (interactive) (scroll-down 1)))  
  255.   
  256. ----  
  257. keywiz 游戏  
  258.   
  259.   kbd-macro-query  
  260.     Query user during kbd macro execution.  
  261.     Nope.  The correct answer is: C-x q  
  262.     
  263.   repeat-complex-command  
  264.     Edit and re-evaluate last complex command, or ARGth from last.  
  265.     Incorrect.  The correct answer is: , , C-x M-:, C-x M-ESC  
  266.   
  267. ----  
  268. CDLaTeX 的 *CDLaTeX Help* 问题  
  269.   
  270.   C-c ? 打开的 *CDLaTeX Help* 缓冲,缺省打开了 view mode,而后来的“'”,  
  271.   “`”命令的提示都使用并修改这个缓冲的内容,但 view mode 不可修改,以至  
  272.   发生错误。  
  273.   
  274.   在其中的 cdlatex-turn-on-help 函数修改了一下,暂时解决这个毛病:  
  275.   "(erase-buffer)" 之前加一句 "(view-mode -1)"。  
  276.   
  277.   [URL:http://zon.astro.uva.nl/~dominik/Tools/cdlatex/]  
  278.   
  279. ----  
  280. 替换文件名中的环境变量  
  281.   
  282.   (substitute-in-file-name "$HOME/.emacs.d/.emacs.el")  
  283.   
  284. ----  
  285. 高亮显示 C/C++ 中的可能的错误(CWarn mode)  
  286.   
  287.   配置:(global-cwarn-mode 1)    
  288.   手动:M-x cwarn-mode  
  289.   参考:C-h v cwarn-configuration  
  290.   
  291. ----  
  292. 数字键直接作为前缀参数的全局子模式 (Autoarg mode)  
  293.   
  294.   配置:(autoarg-mode 1)  
  295.   手动:M-x autoarg-mode & autoarg-kp-mode  
  296.   参考:Commentary in emacs/lisp/autoarg.el  
  297.   
  298.   任何模式下的数字全都是前缀参数了,M-2 C-n 只需 2 C-n;但想输入数字时,  
  299.   得用 C-2 C-3 或 23 SPC。  
  300.   
  301. ----  
  302. Windows 上 Emacs 启动时最大化  
  303.   
  304.   Windows 注册表中添加 (不要 toolbar):  
  305.     HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs\EMACS.Toolbar=0 (REG_SZ)  
  306.   .emacs.el 中:  
  307.    (w32-send-sys-command #xf030)  
  308.   
  309. ----  
  310. BibTeX 自动产生的 key 的方法  
  311.   
  312.   参考:C-h f bibtex-generate-autokey RET  
  313.   
  314. ----  
  315. yap, gnserv, emacs 反向查找  
  316.   
  317.   yap: view->options->Inverse Search->Command line 中:    
  318.     "gnuclientw.exe" "-q"  "+%l" "%f"  
  319.   
  320.   GNUSERV setup:  
  321.     (gnuserv-start)  
  322.     (setq gnuserv-frame (selected-frame))  
  323.     (setenv "GNUSERV_SHOW_EMACS" "1")  
  324.   
  325. ----  
  326. Calendar 中显示农历节日  
  327.   
  328.   (setq local-holidays  
  329.         '((holiday-chinese 1 15 "元宵节 (正月十五)")  
  330.           (holiday-chinese 5  5 "端午节 (五月初五)")  
  331.           (holiday-chinese 9  9 "重阳节 (九月九)")  
  332.           (holiday-chinese 8 15 "中秋节 (八月十五)")))  
  333.     
  334.   (autoload 'chinese-year "cal-china" "Chinese year data" t)  
  335.     
  336.   (defun holiday-chinese (cmonth cday string)  
  337.     "Chinese calendar holiday, month and day in Chinese calendar (CMONTH, CDAY). 
  338.    
  339.   If corresponding MONTH and DAY in gregorian calendar is visible, 
  340.   the value returned is the list \(((MONTH DAY year) STRING)). 
  341.   Returns nil if it is invisible in the current calendar window."  
  342.     (let* ((m displayed-month)  
  343.          (y displayed-year)  
  344.          (gdate (calendar-gregorian-from-absolute  
  345.                  (+ (cadr (assoc cmonth (chinese-year y))) (1- cday)))))  
  346.       (increment-calendar-month m y (- 11 (car gdate)))  
  347.       (if (> m 9) (list (list gdate string)))))  
  348.     
  349. ----  
  350. 查看 frame 参数  
  351.   
  352.   (frame-parameter nil 'width)  
  353.   (frame-parameter nil 'height)  
  354.   (frame-parameter nil 'left)  
  355.   (frame-parameter nil 'top)  
  356.   放在 default-frame-alist 中的四个参数,先调整、查看,再修改  
  357.   
  358.   或者更直接的:  
  359.   (frame-parameters nil)  
  360.   
  361. ----  
  362. 设置 C Source 目录  
  363.   
  364.   (setq find-function-C-source-directory "~/work/emacs/src")  
  365.   
  366. ----  
  367. 不显示 HTML 中的标签  
  368.   
  369.   HTML-mode:  
  370.     C-x C-i (sgml-tags-invisible)  
  371.   
  372. ----  
  373. 颠倒一块文本  
  374.   
  375.    M-x reverse-region     以行为单位颠倒文本  
  376.   
  377. ----  
  378. BibTeX 管理 bib 文件  
  379.   
  380.   添加、修改很方便。from o8o@smth:  
  381.     1. 可以根据需要插入一个模板 (参考 C-c C-e C-h);  
  382.     2. 可以方便清除模板中不需要的项目 (C-c C-c);  
  383.     3. 插入后可以生成一个自己需要的 Key (自动或手动的);  
  384.     4. 可以根据 Key 把参考文献排序插入,不用担心重复查入同一条文献  
  385.        (C-h v bibtex-maintain-sorted-entries);  
  386.     5. 在各个项中移动很方便 (TAB & C-j)。  
  387.   
  388. ----  
  389. RefTeX 管理/浏览/调整 TeX 文件中的章节、标签、引用、索引等  
  390.   
  391.   可以和 AUCTeX 配合使用。  
  392.   (setq reftex-plug-into-AUCTeX t)  
  393.   (add-hook 'TeX-mode-hook 'turn-on-reftex)  
  394.   
  395.   还可以再 TeX buffer 中创建索引、标签、引用等。  
  396.   
  397. ----  
  398. 插入 -*- MODENAME -*- 标签  
  399.   
  400.   (defun chunyu-insert-file-variable ()  
  401.     "Insert file variable string \"-*- Major-Mode-Name -*-\" with 
  402.   comment char"  
  403.     (interactive)  
  404.     (insert  
  405.      (concat comment-start " -*- "  
  406.              (substring  
  407.               (symbol-name (symbol-value 'major-mode)) 0 -5)  
  408.              " -*- " comment-end)))  
  409.   
  410. ----  
  411. CVS AUCTeX 中有 ConTeXt 模式  
  412.   
  413.   不需要自己装了,而且绑定和 LaTeX-mode 差不多。  
  414.   
  415.     export CVS_RSH="ssh"  
  416.     cvs -z3 -d:ext:anoncvs@savannah.gnu.org:/cvsroot/auctex co auctex  
  417.     cd auctex && ./autogen.sh && ./configure  
  418.       (如果在 Windows 上,编辑 Makefile, doc/Makefile,修改其中的 info,  
  419.        prefix 目录)  
  420.     make && make install  
  421.   
  422. ----  
  423. feedmail instead of fakemail  
  424.   
  425.   feedmail package 似乎可以代替 fakemail.exe 发信,不过还不清楚如何配置。  
  426.   
  427.   可惜如果在 Windows 上,需要 sh.exe 和 rmail.exe 等:(。  
  428.   
  429. ----  
  430. 去掉 .emacs 中不再需要的绑定(现在很少使用了)  
  431.   
  432.   (define-prefix-command 'ctl-x-m-map)  
  433.   (global-set-key "\C-xm" 'ctl-x-m-map)  
  434.   (define-key ctl-x-m-map "e" 'cvs-examine)  
  435.   (define-key ctl-x-m-map "m" 'man-follow)  
  436.   (define-key ctl-x-m-map "g" 'run-scheme)  
  437.   (define-key ctl-x-m-map "b" 'list-bookmarks)  
  438.   (define-key ctl-x-m-map "l" 'browse-kill-ring)  
  439.   (define-key ctl-x-m-map "a" 'align-current)  
  440.   
  441. ----  
  442. Commentary of emacs-cvs/lisp/iimage.el  
  443.   
  444.   should be:  
  445.   (autoload 'iimage-mode "iimage" "Inline image." t)  
  446.   (autoload 'turn-on-iimage-mode "iimage" "Inline image." t)  
  447.   ;; ``I''nfo-mode-hook  
  448.   (add-hook 'Info-mode-hook 'turn-on-iimage-mode)  
  449.   
  450. ----  
  451. 使用 gnuserv.exe 少不了的参数:  
  452.   
  453.   (gnuserv-start)  
  454.   (setq gnuserv-frame (selected-frame))  
  455.   (setenv "GNUSERV_SHOW_EMACS" "1")  
  456.   
  457. ----  
  458. 当前终端能否显示支持的字体(判断图形终端的令一个方法)  
  459.   
  460.   (display-multi-font-p)  
  461.   
  462.   Return non-nil if DISPLAY is a graphic display.  
  463.   (display-multi-font-p &optional DISPLAY)  
  464.   
  465. ----  
  466. 通过 smbclient 在 Linux box 上给 Windows box 发送 net message  
  467.   
  468.   Linux -> Windows (Net-Message) in Emacs:  
  469.   
  470.     M-| smbclient -M 机器名  
  471.   
  472.   或者直接:  
  473.   cat "Hello!" | smbclient -M 机器名  
  474.   
  475. ----  
  476. Outline minor mode 的键前缀  
  477.   
  478.   缺省的:  
  479.   
  480.     C-c @  
  481.   
  482.   或者自己修改:  
  483.   
  484.     (setq outline-minor-mode-prefix "\C-c\C-o")  
  485.   
  486. ----  
  487. Windows 上用相关联的程序打开文件  
  488.   
  489.   (eval-after-load "dired"  
  490.     '(progn  
  491.        ;; Dired 原来的 “o” 对我来说基本没用。  
  492.        (define-key dired-mode-map "o" 'chunyu-dired-open-explorer)))  
  493.   
  494.   (defun chunyu-dired-open-explorer ()  
  495.     (interactive)  
  496.     (let ((file-name (dired-get-file-for-visit)))  
  497.       (if (file-exists-p file-name)  
  498.           (w32-shell-execute "open" file-name nil 1))))  
  499.   
  500.   原来使用 cmd.exe 的 start 命令,但路径中不能有空格。这个  
  501.   w32-shell-execute 就没问题了,还不错。  
  502.   
  503.   此外,从另一个人的 .emacs 中学来的,可以同时打开所有做标记的文件:  
  504.   (defun dired-execute-file (&optional arg)  
  505.     (interactive "P")  
  506.     (mapcar #'(lambda (file) (w32-shell-execute "open" file))  
  507.             (dired-get-marked-files nil arg)))  
  508.   
  509.   而且可以绑定到鼠标上,用鼠标中键(mouse-2)或双击(double-mouse-1)打开:  
  510.   (define-key dired-mode-map [mouse-2] 'dired-mouse-execute-file)  
  511.   (defun dired-mouse-execute-file (event)  
  512.     "In dired, execute the file or goto directory name you click on."  
  513.     (interactive "e")  
  514.     (set-buffer (window-buffer (posn-window (event-end event))))  
  515.     (goto-char (posn-point (event-end event)))  
  516.     (dired-execute-file))  
  517.   
  518. ----  
  519. 使用 Windows 上的左右 Win 键  
  520.   
  521.   (setq w32-pass-rwindow-to-system nil)  
  522.   (setq w32-rwindow-modifier 'hyper)  
  523.   (setq w32-pass-lwindow-to-system nil)  
  524.   (setq w32-lwindow-modifier 'hyper)  
  525.   
  526.   例如:  
  527.   (global-set-key [(hyper ?z)] 'compile)  
  528.   
  529. ----  
  530. Dumping emacs 的参数  
  531.   
  532.   #!/bin/sh  
  533.   MYEMACS=$1  
  534.   ./$MYEMACS --batch --load ~/.emacs.d/.emacs.el \  
  535.              --execute "(dump-emacs \"mymacs\" \"$MYEMACS\")"  
  536.   
  537. ----  
  538. 几个 list 命令,列出一些变量  
  539.   
  540.   M-x list-colors-display RET  
  541.   M-x list-faces-display RET  
  542.   
  543.     (setq list-faces-sample-text  
  544.           "赵钱孙李 周吴郑王 abcdefg..z ABCDEFG..Z")  
  545.   
  546.   M-x list-charset-chars  
  547.   M-x list-character-sets  
  548.   M-x list-load-path-shadows  
  549.   M-x list-options  
  550.   M-x list-color-display  
  551.   M-x list-registers  
  552.   M-x list-command-history  
  553.   M-x list-processes  
  554.   M-x list-input-method  
  555.   
  556. ----  
  557. CVS Emacs 查看 utf-8  
  558.   
  559.   M-x utf-translate-cjk-mode  
  560.   (utf-translate-cjk-mode 1)  
  561.   
  562. ----  
  563. 执行 cmd.exe 的 start 命令  
  564.   
  565.   (start-process "dir" nil "cmd.exe" "/c" "start" "c:")  
  566.   当然,用 w32-shell-execute 更好些。  
  567.   
  568. ----  
  569. beginning-of-buffer 的前缀参数  
  570.   
  571.   M-2 M-x beginning-of-buffer RET (M-2 M-<)  缓冲首 20%  
  572.   M-5 M-x beginning-of-buffer RET (M-5 M-<)  缓冲首 50%  
  573.   
  574. ----  
  575. 显示位点附近 elisp 函数的定义  
  576.   
  577.   M-x eldoc-mode RET  
  578.   
  579.   写 elisp 时应该比较有用,实时提示函数的定义格式。  
  580.   
  581. ----  
  582. 查看当前字符的 face  
  583.   
  584.   M-x describe-text-properties RET  
  585.   Find which face is being used at the point.  
  586.   
  587.   M-x describe-face RET  
  588.   
  589. ----  
  590. 使 search-ring 称为 buffer-local 的  
  591.   
  592.   这样 search 的历史根据 buffer 而不同。  
  593.   
  594.   (make-variable-buffer-local 'search-ring)  
  595.   ;; (make-variable-buffer-local 'isearch-string)  
  596.   
  597.   make C-s C-s ... search with strings in buffer local search ring.  
  598.   
  599. ----  
  600. 历史命令的 elisp 列表  
  601.   
  602.   M-x command-history RET  
  603.   
  604. ----  
  605. 清理 current emacs session  
  606.   
  607.   M-x clean-buffer-list RET  
  608.   
  609.   M-x kill-some-buffers RET  
  610.   
  611.   or kill-all-buffers:  
  612.    &
分享到:
评论

相关推荐

    emacs快捷键表/命令

    ### Emacs快捷键与命令详解 #### 引言 Emacs是一款功能强大且高度可定制的文本编辑器,深受程序员和技术人员的喜爱。对于初学者来说,掌握Emacs的基本操作及快捷键能够极大地提高工作效率。本文将详细介绍Emacs的...

    Emacs快捷键列表 – aifreedom_emacs_EMACS快捷键列表_

    以上只是Emacs快捷键的冰山一角。实际上,Emacs提供了无数的快捷键和功能,使得编辑、编程和文档处理变得极其高效。熟练掌握Emacs的快捷键列表,将极大地提升开发和写作体验。记得经常查阅和实践,让这些快捷键成为...

    emacs快捷键大全

    ### Emacs快捷键大全详解 #### 一、简介 在日常工作中,Emacs 是一款功能强大的文本编辑器,深受程序员和开发者们的喜爱。为了提高编辑效率,掌握常用的 Emacs 快捷键是十分必要的。本文将详细介绍 Emacs 的快捷键...

    emacs快捷键参考

    ### Emacs快捷键参考知识点 #### 一、启动与退出Emacs - **启动Emacs**: - 命令:`emacs` - 描述:输入`emacs`即可启动GNU Emacs版本20。 - **注意事项**:如果需要打开特定文件进行编辑,可以参见“读取文件”...

    emacs   快捷键  

    ### Emacs编辑器快捷键详解 #### 一、简介 Emacs是一款极其强大的文本编辑器,其功能之丰富、扩展性之强,在众多编辑器中独树一帜。它支持多种编程语言,内置了丰富的功能模块,并且用户可以根据自己的需求定制...

    Emacs快捷键的总结

    在Emacs中,快捷键是提高效率的关键,下面将详细介绍一些常见的Emacs快捷键及其用途。 1. **文件操作** - `C-x C-f`:打开文件,支持FTP路径。 - `C-x C-v`:打开文件并替换当前缓冲区。 - `C-x C-s`:保存当前...

    Emacs快捷键

    ### Emacs快捷键详解 #### 一、概述 Emacs是一款高度可配置且强大的文本编辑器,支持多种编程语言,具备丰富的扩展性和自定义能力。它不仅适用于文本编辑,还广泛应用于程序开发、文档编写等场景。为了更好地掌握...

    emacs快捷键

    ### Emacs快捷键详解 #### 一、剪切复制文本区域 在Emacs中高效地处理文本需要掌握一系列快捷键,其中最基础的就是剪切、复制和粘贴。 1. **定位光标**:首先,把光标移动到你想要操作的文本区域的起始位置。 2. ...

    emacs快捷键.pdf

    Emacs是一款强大的文本编辑器,尤其受到程序员和高级用户的青睐,因为它提供了丰富的快捷键和功能。在教育领域,学习和掌握Emacs的快捷键能够极大地提高编程和文档编辑的效率。 首先,文件操作是Emacs的基本功能之...

    Emacs 快捷键

    Emacs以其强大的快捷键操作和可扩展性闻名。接下来将详细介绍Emacs中的一些基础和高级快捷键。 ### 启动与退出Emacs - 启动Emacs:在命令行输入 `emacs` 或 `emacs &`(后者会把Emacs放到后台运行)。 - 启动并加载...

    XKeymacs 3.4.8 Windows下模拟Emacs的快捷键

    **XKeymacs 3.4.8:Windows下的Emacs快捷键模拟工具** XKeymacs是一款强大的软件,它允许Windows用户在不改变任何应用程序原有功能的基础上,模拟Emacs编辑器的快捷键操作。这款工具对于那些习惯于Emacs高效快捷键...

    Emacs常用快捷键

    以下是一些常用的Emacs快捷键及其用途: 1. **移动操作**: - `C-v`:向前滚动一屏。 - `M-v`:向后滚动一屏。 - `C-l`:将光标所在行移动到屏幕中央。再次按下,会将当前行移动到屏幕顶部。 - `C-f`:光标向前...

    libreoffice emacs快捷键

    在libreoffice中使用emacs的快捷键,来源于,https://www.kendix.org/blog/basic_emacs_bindings_for_libreoffice_writer.html,使用方法为工具--&gt;自定义-&gt;加载,并选择zip压缩包

    xkeymacs - 桌面快捷键模拟emacs

    为了更好地利用xkeymacs,用户需要了解一些基础的Emacs快捷键,例如M-x(Meta-x)用于调用命令,C-a(Ctrl-a)用于移动光标到行首,C-e用于移动到行尾,C-k用于剪切至行尾,C-y用于粘贴剪切的内容。这些基本操作一旦...

    桌面快捷键极品

    一好好用的一个桌面快捷键,是一款我自己开发的哦

    vs2013 emacs扩展

    一直很喜欢Emacs的键绑定,vs2008到vs2010一直都有Emacs的模拟键绑定,可惜似乎vs2012后这项福利了。 这个原本是vs2010的Emacs扩展插件,经过修改后可以在vs2013上使用。

    Atom-atom-emacs-core-keys,仅用于核心Atom功能的Emacs密钥绑定.zip

    总的来说,"Atom-atom-emacs-core-keys.zip"为那些习惯使用Emacs快捷键的开发者提供了一种在Atom中保持一致操作体验的方式,使得他们能够充分利用Atom的强大功能,同时享受熟悉的键绑定带来的效率提升。

    Emacs快速参考手册

    本文档旨在为用户提供一份详尽的Emacs快捷键指南,帮助用户更高效地使用Emacs进行文本编辑。 #### 二、基本命令 ##### 1. 文件操作 - **打开文件**: - 快捷键:`C-x C-f` - 命令行:`M-x find-file` - 描述:...

    linux-一个emacs插件用于从当前目录向上查找最近的Makefile并执行make命令

    5. **自定义快捷键**:配置Emacs快捷键以快速触发插件功能,提高开发效率。 6. **Emacs配置**:学习如何在Emacs的初始化文件(`.emacs`或`init.el`)中添加和配置新的插件。 掌握这些知识点后,开发者不仅可以有效...

    emacs 参考卡 快捷键

    ### Emacs 参考卡片:快捷键详解 #### 开始与结束 Emacs - **启动 Emacs**: - 使用命令行输入 `emacs` 来启动 GNU Emacs 版本 25。 - **暂停 Emacs 或最小化 Emacs**(在 X 窗口系统下): - 按 `C-z` 键可以...

Global site tag (gtag.js) - Google Analytics