Emacs简介及安装使用 - Something TO DO

Emacs简介及安装使用

Something TO DO posted @ 2014年5月26日 21:17 in Ubuntu with tags emacs , 1562 阅读

通过一次报告了解到Emacs的强大,想了解一下,看看能不能用起来。

 

emacs是一款强大的文本编辑器。其实,emacs不仅仅是一款编辑器,他是一个整合环境,或可称他为集成开发环境,这些功能能让使用者置身于全功能的操作系统中,在基于编辑器的基础上,Emacs自行开发了一个“bourne-shell-like”的shell: EShell。

Emacs还可以:

收发电子邮件
通过FTP/TRAMP编辑远程档案
通过Telnet登录主机
上新闻组
登陆IRC和朋友交流
查看日历
撰写文章大纲
对多种编程语言的编辑
调试程序,结合GDB,EDebug等。支持C/C++,Perl,Python,Lisp等等
玩游戏
计算器
记日记
煮咖啡
管理日程,Task,ToDo,约会等
个人信息管理
目录管理
文件比较
阅读info和man文档
浏览网站
为各种程序(TeX等)提供统一的操作界面
--------------------------------------------------------------------------我是分割线---------------------------------------------------------------------------
一,Emacs的一些基础知识[1]

1.buffer

缓冲区. Emacs并不直接对文件进行操作, 它是把文件加载进buffer, 用户直接操作buffer, 只有当用户确定把buffer中所做的修改写人文件时, Emacs才把buffer中的内容写入文件. buffer实际上就是一个内存缓冲区, 这和一般编辑器中都一样, 应该很好理解.

2.window

窗口. 由于Emacs很早就诞生了, 它的窗口概念和现在基于窗口的操作系统中的窗口概念不是一样的. Emacs中的窗口是用来显示buffer的一个区域. 它并不像操作系统中的窗口拥有自己的标题栏,系统菜单栏.

3.frame

Emacs中的frame就是操作系统中的窗口.

buffer是文件的内存表示, windows则是显示buffer的区域, 一个frame中可以有多个window, Emacs则可以有多个frame.

4.Emacs Lisp

Emacs最基础的部分是用c写的,其他部分都是用Emacs Lisp语言写的,Emacs Lisp语言是基于lisp语言的. lisp是LISt Processor的缩写, 即链表处理语言, 所以lisp语言的操作都是基于链表的, 它的语法也是链表结构, 链表第一个元素表示函数名, 其他元素是参数, 比如通常语言中的a+b, 在lisp就是(+ a b)

5.mode

mode有major mode和minor mode之分, 每个缓冲区对应一个major mode, 也只有一个major mode, 但是可以有多个minor mode. Emacs对每一种文件都有一个mode.

6.命令

你对Emacs所有的操作都是对Emacs的命令的调用。比如,你在text-mode里,当你按下任何字母键进行编辑的时候,实际上是调用的emacs的命令self-insert-command.

7.快捷键

Emacs中Control键用C表示,Alt键用M表示, 即: C-c表示Control C, M-x表示Alt x.

除掉以Alt键开头的,比如Alt a,Emacs中的快捷键基本上都有一个前缀,Emacs中最多的快捷键前缀就是C-x,C-c,前缀表示,你不必要一起按下前缀和后缀,可以先按下前 缀,Emacs会等待你按下剩余的快捷键,这样Emacs中的快捷键按起来非常的方便。

8.keymap

键盘映射. Emacs的快捷键是通过keymap来控制的. 有全局和局部的keymap. 每个mode都会有一个自己的局部的keymap, 局部的keymap会覆盖全局的keymap, 另外如果对应的major mode有开启的minor mode, 而且这个minor mode有keymap的话, 这个minor mode的keymap会覆盖major mode的keymap.

二,emacs文档主要内容

官方文档:http://www.gnu.org/software/emacs/manual/html_node/emacs/index.html

重要知识点:

 

参考文献:

[1]  http://os.51cto.com/art/201109/291709.htm

Avatar_small
BSER 11th Question P 说:
2022年8月18日 16:46

The education board that oversees secondary and junior secondary school level education in the state of Rajasthan is called the Rajasthan Board of Secondary Education (RBSE). Released for All Streams (Science, Commerce, and Arts) is the RBSE Important Model Question Paper for 2023. on the Board's official website in PDF format. BSER 11th Question Paper 2023 The RBSE New Guess Important Model Question Paper 2023 is available for download as a PDF from the official website. Important Model Question Paper 2023 is Available in PDF Format for All Streams Important Model Question Paper for the 11th Grade in Science, Commerce Subjects, RBSE 2023.

Avatar_small
khajane 2 challan 说:
2023年1月23日 16:30

K2 challan also referred to as Khajane 2, an integrated financial management system from the Government of Karnataka. The K2 has been brought into working with an aim to manage the financial business of the government. khajane 2 challan It works to simplify the process of remittance of departments under government by bringing an option of anywhere-anytime payment options. Firstly every department under the government of Karnataka will have access to Khajane 2 which allows their customers to remit to the government through the easy payment links provided.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee