IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    [原]Emacs 帮助系统

    sheismylife发表于 2015-08-01 21:25:05
    love 0

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


    打开帮助向导

    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命令。





沪ICP备19023445号-2号
友情链接