从今天起,操作文本用Emacs,平时有事没事也用Emacs,培养条件反身射能力……
目标:Edit as fast as you think!
./configure --without-xim --without-pop --without-x
(如果make时提示makeinfo***的错误,则安装 texinfo)
浏览
Ctrl + n 下一行
Ctrl + p 上一行
Ctrl/Alt + f 前一字符/单词
Ctrl/Alt + b 后一字符/单词
Ctrl/Alt + a 行头/段头
Ctrl/Alt+ e 行末/段末
Ctrl + v 向下翻页
Alt + v 向上翻页
Ctrl + l 将焦点移动中间
Alt + goto-line 跳到某行
Ctrl + r m 将当前位置保存为书签
Ctrl + r b 跳转到某书签
Ctrl + r l 列出书签
查找
Ctrl + s 普通查找
Ctrl + Alt + s 正规查找
Ctrl + r 向上查
编辑
Ctrl + _ 撤销
Ctrl + @ --> move cursor : (Ctrl + g, cancel marking)
* Ctrl + x / Ctrl + u,l 将选中字符转换大小写
* Ctrl + TAB 缩进选区
* Ctrl + w 剪切
* Alt + w 拷贝
* Ctrl + y 粘贴
缓冲区
Ctrl + c / Ctrl + f 打开文件
Ctrl + c / Ctrl + b 显示缓冲区
Ctrl + c b 跳转到某缓冲区
Ctrl + c k 关掉某缓冲区
窗口
Ctrl + o 切换到另一个窗口
Ctrl + x 1 只显示一个窗口
Ctrl + x 2 上下分割当前窗口
Ctrl + x 3 左右分割当前窗口
C++ Plugin Short Cut
-------------------
Ctrl + c Ctrl + c 注释整区块
Ctrl + u Ctrl + c Ctrl + c 取消释
MISC
-------------------
Ctrl + u n command
Ctrl + x h 全选文本
Alt + x load-file ~/.emacs 不退出emacs,重新加载配置文件
Ctrl + x Ctrl + v ENT 重新加载当前的文件
Ctrl + x Ctrl + e 运行光标前的第一个lisp语句
q Get out of debugger error
Alt + x hexl-mode 进入hex模式
Ctrl + c Ctrl + c 退出hex模式
Emacs Lisp
------------------------
LISP是一种解释性语言(人工智能LISP),就如其名LISP一样,它里面有很多LIST: '( hello "world" 1 ( inner list ) )
如果没有单引号,list只是数据:' ( this is just a data list ),emacs将会打印出 this is just a data list
如果没单引号,list是一个要执行的函数: ( + 2 2 ) ,emacs将会进行运算打印出4,list第一个元素是函数名
* evaluating a symbolic expression most commonly causes the Lisp interpreter to return a value and perhaps carry out a side effect
* we can bind the variable to a value: to a number, such as 72; to a string, "such as this"
; to a list, such as (spruce pine oak)
; we can even bind a variable to a function definition.
* every Lisp function must return a value if it does not get an error
* setq
is just like set
except that the first argument is quoted automatically
* Emacs has more than twenty characters predefined for use with interactive
.
* .emacs file is automatically evaluated and all the function definitions within it are installed.
load
function causes Emacs to evaluate and thereby install each of the functions in the files.
if you have code that your whole site will use, it is usual to put it in a file called site-init.el that is loaded when Emacs is built. This makes the code available to everyone who uses your machine.
* "let" statement is fucking of no use!
* Two site-wide initialization files, site-load.el and site-init.el,site-start.el loaded before your .emacs file, and default.el
* (autoload 'html-helper-mode "html-helper-mode" "Edit HTML documents" t) 从html-helper-mode文件中加载 html-helper-mode函数,这个文件要在load-path之中
* require
is an alternative to autoload
for loading files automatically.
参考QUOTE:
------------------------
有趣的LISP教程
http://www.lisperati.com/casting.html
Programing in Emacs Lisp
http://www.gnu.org/software/emacs/emacs-lisp-intro/html_mono/emacs-lisp-intro.html
emacs字体设置
http://learn.tsinghua.edu.cn:8080/2002315162/font.html
使用emacs的etags阅读源代码
http://www.qtchina.net/?q=node/364
http://www.linuxforum.net/forum/showflat.php?Board=vim&Number=555055
Emacs Tips & Tricks
http://geosoft.no/development/emacs.html
Emacs Quick Reference
http://seamons.com/projects/emacs/
The Emacs Manual
http://www.cs.utah.edu/dept/old/texinfo/emacs18/emacs_13.html
Emacs Wiki
http://www.emacswiki.org/cgi-bin/wiki?LineNumbers
Effective Emacs 中文版
http://blog.csdn.net/DelphiNew/archive/2008/01/19/2053676.aspx
Emacs 下用C++编程
http://hi.baidu.com/%D3%EA%BA%E7%D1%F4/blog/item/f8bcbe90e317b685a977a4bf.html
Emacs快捷键
http://blog.chinaunix.net/u/28366/showart_247917.html
Emacs Text Editor
http://csgalati.swansea.ac.uk/gnu-linux/emacs.html
Programming in Emacs Lisp笔记(一)
http://www.javaeye.com/topic/93975
emacs configuration tutorial
http://www.freebsd.org/doc/en/books/developers-handbook/emacs.html