Emacs

 一、安装
下载emacs       tar -zxvf emacs**.tar.gz -----> cd emacs** -------> yum install ncurses-devel -----> ./configure --prefix=/usr/local/emacs24.5 --without-x ----> make --------> make install -------> cp /usr/local/emacs24.5/bin/emacs /usr/bin


二、配置 
配置lisp开发环境
下载sbcl    tar -jxvf sbcl**.tar.gz2 -----> cd sbcl** -------> sh install.sh ----> sbcl --->(exit)
下载slime 
 配置MELPA库  emacs ~/.emacs.d/.init.el 改为
(require 'package) ;; You might already have this line
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(when (< emacs-major-version 24) ;; For important compatibility libraries like cl-lib 
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize) ;; You might already have this line
emacs--->M-x package-list-packages--->U----->C-x C-c------>emacs----->M-x slime 
 
三、按键设置
C-x C-f 打开文件
C-x C-v 另打开文件
C-x i   当前位置插入
其他文件内容
C-x b   切换缓存区
C-x C-s 保存
C-x C-w 另存为
C-x C-c 退出Emacs
C-h f/t/i  帮助
C-h c C-f 获取C-f函数名
C-h k C-f 获取C-f文档
C-h f previous-line 获取所有关于previous-line命令的文档
C-h v displays the documentation of variables
C-h a file displays in another window a list of All M-x commands with "file" in their names

C-h  i    Read included Manuals(a.k.a. Info)
C-h  i  m  emacs      Read the Emacs manual
C-v  M-v   上下翻页 
C-l将当前光标所在位置移至中央、顶端、下方
                          Previous line, C-p
                                  :
                                  :
   Backward, C-b .... Current cursor position .... Forward, C-f
                                  :
                                  :
                            Next line, C-n

        C-f     Move forward a character
        C-b     Move backward a character
        M-f     Move forward a word
        M-b     Move backward a word
        C-n     Move to next line
        C-p     Move to previous line
        C-a     Move to beginning of line
        C-e     Move to end of line
        M-a     Move back to beginning of sentence
        M-e     Move forward to end of sentence

 M-<    Move to the Top of the tutorial
 M->    Move to the Bottom of the tutorial

C-u 8 C-v    excute C-v 8 times

C-g    Stop commands

C-x 1  One Window(kill all other windows)

C-h k C-f  Display Document on C-f

        <DEL>        Delete the character just before the cursor                
        C-d          Delete the next character after the cursor                                                                                 
        M-<DEL>      Kill the word immediately before the cursor                
        M-d          Kill the next word after the cursor                                                                                 
        C-k          Kill from the cursor position to end of line               
        M-k          Kill to the end of the current sentence    
C-<SPC>  C-w   kill Mark set to here
C-k M-k    C-y  M-y        Cut Pasting lines

C-/   C-x u  C-_   UNDO

C-x C-f   Find a file
C-x C-s   Save the file

C-x C-b   List buffers
C-x b buffer     SwitchBuffer(fileName)
C-x s     Save some changed buffers

        C-x     Character eXtend.  Followed by one character.
        M-x     Named command eXtend.  Followed by a long name.
        C-x C-f         Find file
        C-x C-s         Save file
        C-x s           Save some buffers
        C-x C-b         List buffers
        C-x b           Switch buffer
        C-x C-c         Quit Emacs
        C-x 1           Delete all but one window
        C-x u           Undo
        M-x command  eXtended commands
        M-x replace-string
        M-x recover-file           Auto SaveFile    #FileName#
        M-x fundamental mode/text-mode/auto-fill-mode      change Mode

C-l C-l           bring this line to the top of screen.
C-h m           to see how Text mode differs from Fundamental mode.
C-x 1            to remove the documentation from the screen.

C-u 2 0 C-x f           set the margin
M-q         re-fill the paragraph

C-s/C-r       search/reversed-search

C-x 2           splits the screen into two windows.
C-M-v          scroll the bottom window.
C-x o ("o" for "other") to move the cursor to the bottom window.

C-x 4 C-f the name of your files.

M-x make-frame    对于图形化界面
M-x delete-frame
posted @ 2016-11-10 11:31  fyk1Ex  阅读(234)  评论(0)    收藏  举报