您的位置:首页 > 其它

Emacs 帮助系统

2015-08-01 21:25 375 查看
Emacs是一个可定制,可扩展,self-documenting(自己就可以提供文档)的编辑器,本文探讨如何使用Emacs的帮助系统。

打开信息系统

c-h i 会看到很多信息已经组织好
This (the Directory node) gives a menu of major topics.
Typing "q" exits, "?" lists all Info commands, "d" returns here,
"h" gives a primer for first-timers,
"mEmacs<Return>" visits the Emacs manual, etc.

In Emacs, you can click mouse button 2 on a menu item or cross reference
to select it.

* Menu:

Emacs
* AUCTeX: (auctex). A sophisticated TeX environment for Emacs.
* preview-latex: (preview-latex).
Preview LaTeX fragments in Emacs
* Org Mode: (org). Outline-based notes management and organizer
* Emacs: (emacs). The extensible self-documenting text editor.
* Emacs FAQ: (efaq). Frequently Asked Questions about Emacs.
* Elisp: (elisp). The Emacs Lisp Reference Manual.
* Emacs Lisp Intro: (eintr). A simple introduction to Emacs Lisp
programming.
* Ada mode: (ada-mode). Emacs mode for editing and compiling Ada code.
* CC Mode: (ccmode). Emacs mode for editing C, C++, Objective-C,
Java, Pike, AWK, and CORBA IDL code.

打开帮助向导

c-h t
根据emacs启动时的语言环境,会自动切换对应的语言。
中文内容不足1000行,读一遍应该会有很全面的对Emacs的了解。

查找某个组合建当前绑定了哪个命令

比如我想看一下c-x c-f 对应的命令
先键入命令c-h k, 然后输入c-x c-f,一个buffer被打开,显示内容如下:
C-x C-f runs the command find-file, which is an interactive compiled
Lisp function in `files.el'.

It is bound to <open>, C-x C-f, <menu-bar> <file> <new-file>.

(find-file FILENAME &optional WILDCARDS)

Edit file FILENAME.
Switch to a buffer visiting file FILENAME,
creating one if none already exists.
Interactively, the default if you just type RET is the current directory,
but the visited file name is available through the minibuffer history:
type M-n to pull it into the minibuffer.

You can visit files on remote machines by specifying something
like /ssh:SOME_REMOTE_MACHINE:FILE for the file name. You can
also visit local files as a different user by specifying
/sudo::FILE for the file name.
See the Info node `(tramp)File name Syntax' in the Tramp Info
manual, for more about this.

Interactively, or if WILDCARDS is non-nil in a call from Lisp,
expand wildcards (if any) and visit multiple files. You can
suppress wildcard expansion by setting `find-file-wildcards' to nil.

To visit a file without any kind of conversion and without
automatically choosing a major mode, use M-x find-file-literally.


查看所有快捷键

c-h b
可以看到如下结果:
Key translations:
key binding
--- -------

C-x Prefix Command
<double-down-mouse-1> mouse--down-1-maybe-follows-link
<down-mouse-1> mouse--down-1-maybe-follows-link

C-x 8 iso-transl-ctl-x-8-map

C-x 8 SPC  
C-x 8 ! ¡
C-x 8 " Prefix Command
C-x 8 $ ¤
C-x 8 ' Prefix Command
C-x 8 * Prefix Command
C-x 8 + ±
C-x 8 , Prefix Command
C-x 8 - ­
C-x 8 . ·
C-x 8 / Prefix Command
C-x 8 1 Prefix Command
C-x 8 3 Prefix Command

命令搜索

c-h a, 然后输入关键字或者正则表达式进行搜索,比如输入org,会得到以下结果:
Type RET on an entry to view its full documentation.

jde-import-organize M-x ... RET
Organize import statements of the current Java source buffer.
org-add-note M-x ... RET
Add a note to the current entry.
org-add-planning-info M-x ... RET
Insert new timestamp with keyword in the line directly after the
headline.
org-advertized-archive-subtree M-x ... RET

命令或者函数搜索

和前一个差不多,多加一次按键: c-u c-h a

描述函数

c-h f 用来描述一个函数, 如果想看更多细节,用c-u c-h f命令。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  emacs