GNU Emacs

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(Erlang)
(常用快捷键)
(未显示1个用户的25个中间版本)
第1行: 第1行:
 
{{SeeWikipedia}}
 
{{SeeWikipedia}}
 +
 +
GNU Emacs
 +
 +
==简介==
 
Emacs是一种信仰,也是种生活方式!
 
Emacs是一种信仰,也是种生活方式!
  
第9行: 第13行:
  
 
[[Image:Emacs.png|right]]
 
[[Image:Emacs.png|right]]
==安装指南==
+
 
 +
[https://www.gnu.org/gnu/rms-lisp.html 我的 Lisp 经历和 GNU Emacs 的开发]
 +
 
 +
==功能==
 +
 
 +
==指南==
 +
===OS X===
 +
 +
[http://emacsformacosx.com/ GNU Emacs For Mac OS X]
 +
 
 +
===Linux===
 
Debian 7 安装 Emacs 25
 
Debian 7 安装 Emacs 25
 
[[文件:emacs-25.jpg|right|thumb|Emacs 25]]
 
[[文件:emacs-25.jpg|right|thumb|Emacs 25]]
第39行: 第53行:
 
3. 取消自动创建备份文件功能
 
3. 取消自动创建备份文件功能
  
Windows 用户: http://www.emacswiki.org/cgi-bin/emacs-en?CategoryPorts
+
===Windows===
 +
[http://www.emacswiki.org/cgi-bin/emacs-en?CategoryPorts Windows 用户]
  
 
==.emacs==
 
==.emacs==
第48行: 第63行:
  
 
==常用快捷键==
 
==常用快捷键==
C-x C-f:打开文件
+
*C-x C-f:打开文件
 +
*M-x ielm : REPL
  
 
==GTK+==
 
==GTK+==
第65行: 第81行:
 
===Lisp===
 
===Lisp===
 
*[[Emacs Lisp]]
 
*[[Emacs Lisp]]
 +
 +
===Clojure===
 +
*[https://github.com/clojure-emacs/cider CIDER]
  
 
===Erlang===
 
===Erlang===
 
*[http://docs.huihoo.com/erlang/17.3/lib/tools-2.7/doc/html/erlang.el.html erlang.el]:Erlang mode for Emacs
 
*[http://docs.huihoo.com/erlang/17.3/lib/tools-2.7/doc/html/erlang.el.html erlang.el]:Erlang mode for Emacs
 
*[https://github.com/tjarvstrand/edts Erlang Development Tool Suite]
 
*[https://github.com/tjarvstrand/edts Erlang Development Tool Suite]
 +
 +
===[[OCaml]]===
 +
*[https://github.com/janestreet/ecaml Writing Emacs plugin in OCaml]
 +
 +
===[[Rust]]===
 +
*[https://github.com/remacs/remacs Rust love Emacs]
 +
*[https://github.com/rust-lang/rust-mode rust-mode]
  
 
===C/C++===
 
===C/C++===
 
*[[CC Mode]] - C, C++ (CPP), Objective C, Java, etc.
 
*[[CC Mode]] - C, C++ (CPP), Objective C, Java, etc.
 
  C-h P
 
  C-h P
 +
 +
===Lua===
 +
[https://github.com/immerrr/lua-mode lua-mode]
 +
 +
===[[Swift]]===
 +
[https://github.com/swift-emacs/swift-mode swift-mode]
 +
 +
===[[Objective-C]]===
 +
[http://www.emacswiki.org/emacs/ObjectiveCMode Objective-C Mode]
  
 
===Go===
 
===Go===
第87行: 第122行:
  
 
===PHP===
 
===PHP===
*PHP mode for Emacs - http://sourceforge.net/projects/php-mode/
+
*[https://github.com/ejmr/php-mode PHP Mode for GNU Emacs]
  
 
===Perl===
 
===Perl===
第101行: 第136行:
 
[https://github.com/hvesalai/sbt-mode sbt-mode]
 
[https://github.com/hvesalai/sbt-mode sbt-mode]
  
==相关工具==
+
==仓库==
 +
使用 [https://melpa.org/ MELPA] 仓库
 +
 
 +
在 .emacs.d 目录下创建  init.el
 +
(require 'package)
 +
(add-to-list 'package-archives
 +
              '("melpa" . "https://melpa.org/packages/") t)
 +
(when (< emacs-major-version 24)
 +
  ;; For important compatibility libraries like cl-lib
 +
  (add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")))
 +
(package-initialize)
 +
然后
 +
M-x package-list-packages
 +
安装 el-get
 +
M-x package-install
 +
 
 +
==工具==
 
*[[Emacs Code Browser]]
 
*[[Emacs Code Browser]]
 
*[[Emacs Muse]]
 
*[[Emacs Muse]]
 
*[[XEmacs]]
 
*[[XEmacs]]
 
*[[COGRE]] - Connected Graph Editor
 
*[[COGRE]] - Connected Graph Editor
 +
*[https://github.com/emacs-eaf Emacs Application Framework (EAF)]
  
 
==作为编辑器==
 
==作为编辑器==
第170行: 第222行:
 
* Life 游戏
 
* Life 游戏
 
* hanoi  
 
* hanoi  
 +
 +
==开发者玩家==
 +
*[http://emacsredux.com/ Emacs Redux]
 +
*[https://github.com/chrisbarrett Chris Barrett]
 +
 +
==图集==
 +
<gallery>
 +
image:emacs-application-framework.png|EAF应用框架
 +
</gallery>
  
 
==链接==
 
==链接==
 
*http://www.gnu.org/software/emacs/
 
*http://www.gnu.org/software/emacs/
 +
*[https://github.com/emacs-tw/awesome-emacs Awesome Emacs] [[image:awesome.png]]
 +
*[https://github.com/emacs-mirror/emacs Emacs @ GitHub]
 
*[http://www.emacswiki.org/ Emacs Wiki]
 
*[http://www.emacswiki.org/ Emacs Wiki]
 
*[http://emacser.com Emacs 中文网]  
 
*[http://emacser.com Emacs 中文网]  
第183行: 第246行:
 
*[http://www.ibm.com/developerworks/cn/education/linux/l-emacs/ 生活在 Emacs 中]
 
*[http://www.ibm.com/developerworks/cn/education/linux/l-emacs/ 生活在 Emacs 中]
 
*[http://wenshanren.org/ 肉山博客 (Wenshan's Blog)]
 
*[http://wenshanren.org/ 肉山博客 (Wenshan's Blog)]
 
+
*[http://everet.org/thinking-of-emacs.html Emacs随想]
{{Comment}}
+
*[http://ldp.huihoo.org/LDP/espk-ug/html/index.html Emacspeak User's Guide]
 +
*[http://www.unexpected-vortices.com/emacs/quick-ref.html GNU Emacs Quick Reference]
  
 
[[category:IDE]]
 
[[category:IDE]]
 
[[category:editor]]
 
[[category:editor]]
 
[[category:emacs]]
 
[[category:emacs]]
 +
[[category:lisp]]
 +
[[category:Emacs Lisp]]
 +
[[category:Huihoo Foundation]]

2022年1月22日 (六) 07:43的版本

Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 GNU Emacs Thanks, Wikipedia.

GNU Emacs

目录

简介

Emacs是一种信仰,也是种生活方式!

Emacs 是对技术极限不懈追求的信仰!

Emacs 是一个不折不扣的操作系统,一个终极工具!

学完Elisp不是探索的终点, 而是乐趣的开始!

Emacs.png

我的 Lisp 经历和 GNU Emacs 的开发

功能

指南

OS X

GNU Emacs For Mac OS X

Linux

Debian 7 安装 Emacs 25

Emacs 25
apt-get install autoconf automake libtool texinfo build-essential xorg-dev libgtk2.0-dev libjpeg-dev
libncurses5-dev libgif-dev libtiff-dev libm17n-dev libpng12-dev librsvg2-dev libotf-dev
git clone --depth 1 git://git.sv.gnu.org/emacs.git
cd emacs/
./autogen.sh
./configure
make bootstrap
sudo make install

对Debian用户

#apt-get install emacs21
#apt-get install debian-el // Emacs helpers specific to Debian users. 
#apt-get isntall emacs-goodies-el // Miscellaneous add-ons for Emacs

EmacsForDebian - http://www.emacswiki.org/cgi-bin/wiki/EmacsForDebian

Emacs中文环境设置(Debian Linux)

1. 安装mule-ucs

apt-get install mule-ucs

2. 安装字体

apt-get install emacs-intl-fonts
apt-get install xfonts-intl-chinese

这时emacs已经支持UTF8

3. 取消自动创建备份文件功能

Windows

Windows 用户

.emacs

 (setq line-number-mode t) // To enable line-number-mode by default in Emacs

Debian

http://www.debian.org/doc/packaging-manuals/debian-emacs-policy

常用快捷键

  • C-x C-f:打开文件
  • M-x ielm : REPL

GTK+

apt-get install emacs22-gtk // GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11)
./emacs22-gtk &  

Markdown

在 Emacs 中使用 Markdown

编程语言

Programming Modes - http://www.emacswiki.org/cgi-bin/emacs-en/ProgrammingModes

Emacs Code Browser(ECB) : Code browser for several languages for Emacs.

#apt-get intall ecb 

Lisp

Clojure

Erlang

OCaml

Rust

C/C++

  • CC Mode - C, C++ (CPP), Objective C, Java, etc.
C-h P

Lua

lua-mode

Swift

swift-mode

Objective-C

Objective-C Mode

Go

Go Lang Mode

Python

Ruby

PHP

Perl

CPerlMode - http://www.emacswiki.org/cgi-bin/wiki/CPerlMode

Dart

dart-vim-plugin

Java

JDEE - http://jdee.sunsite.dk/ - http://www-128.ibm.com/developerworks/java/library/j-emacs/

Scala

sbt-mode

仓库

使用 MELPA 仓库

在 .emacs.d 目录下创建 init.el

(require 'package)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/") t)
(when (< emacs-major-version 24)
  ;; For important compatibility libraries like cl-lib
  (add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)

然后

M-x package-list-packages

安装 el-get

M-x package-install

工具

作为编辑器

  • 支持宏
  • 编辑文本、各种程序
  • 语法高亮,自动补全,代码折叠,在线帮助,自动语法检查...
  • 写 TeX/LaTeX 文档,AUCTeX,BibTeX,Preview LaTeX
  • 文件比较,图形化界面,文件合并
  • 支持 HTML/XML/SGML/PHP/PERL/Python/C/C++/JAVA ... 的编辑
  • Vi 模拟器
  • 中文处理

其他工具的界面

  • 调试程序,集成多种调试器(gdb等)的控制功能
  • 版本管理,作为 CVS, Subversion 的前端 VC mode,PCL-CVS
  • 文件浏览 Dired
  • 查字典
  • 拼写检查
  • 调用 shell
  • 调用 Scilab 进行专业科学计算
  • 代码浏览 (cscope)

很强的可定制性

  • Emacs 使用的 Emacs Lisp
  • .emacs.el,.gnus.el ...
  • 各种环境下的设置

网上浏览

  • 收/发/管理电子邮件 Mew , 让.mew.el能保存POP密码
  • 阅读新闻组 Gnus
  • 登陆 IRC,在线聊天 Erc Rcirc
  • 登陆 FTP,编辑远程文件
  • 管理/发布 Wiki emacs-wiki, pmwiki-mode
  • 管理/发布 Blog emacs-wiki-blog, emacs-wiki-journal
  • 读取 RSS nnrss
  • 浏览网页

w3m (很爽,推荐): http://emacs-w3m.namazu.org/

#apt-get install w3m // 可独立使用
$ w3m http://www.huihoo.org
#apt-get install w3m-el
ESC-x w3m enter

w3: http://www.cs.indiana.edu/elisp/w3/docs.html

#apt-get install w3-el-e21 // web browser for GNU Emacs 21
ESC-x w3 enter
  • 看 info/man

个人信息管理

  • 有地址簿/电话簿
  • 有万年历,各种不同历法
  • 记日记
  • 日程管理Calendar and Diary
  • 编写大纲

各种扩展

  • 科学计算器
  • 浏览源码
  • 同时支持多种语言的字符编码

休闲娱乐

  • 多媒体 Mpg123 EMMS
  • 心理医生
  • 游戏
  • Life 游戏
  • hanoi

开发者玩家

图集

链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱