Mac OS Emacs,一个Mac OS下的Web开发的Emacs配置分享

这里用到的是Purcell的.emacs配置,从某种意义上来说,这是一个资深的emacs专家。

安装

 git clone https://github.com/purcell/emacs.d.git ~/.emacs.d

接着启动Emacs就可以了。

配置

按照作者github上写的支持下面这些,因为作者也是web开发人员

  • Ruby / Ruby on Rails
  • CSS / LESS / SASS / SCSS
  • HAML / Markdown / Textile / ERB
  • Clojure (via nrepl)
  • Javascript / Coffeescript
  • Python
  • PHP
  • Haskell
  • Erlang
  • Common Lisp (with Slime)

emacs ide

让Emacs 更像ide的一个方法就是有一个文件浏览功能

ecb

ECB stands for "Emacs Code Browser". While Emacs already has good editing support for many modes, its browsing support is somewhat lacking. That's where ECB comes in: it displays a number of informational windows that allow for easy source code navigation and overview.

安装ecb

我们还需要安装cedet这是一个必要的依赖,当然我们还是用Emacs自带的包管理来安装

 M-x package-install cedet

于是,安装ecb

 M-x package-install ecb

emacs 24最重要的功能就是有了“包管理系统”。

切换buffer

这里就用到了window-number

安装 window-number

M-x package-install window-number

然后添加到配置里,也就是init.el

(require 'window-number)
(window-number-mode 1)

或许您还需要下面的文章:

关于我

Github: @phodal     微博:@phodal     知乎:@phodal    

微信公众号(Phodal)

围观我的Github Idea墙, 也许,你会遇到心仪的项目

QQ技术交流群: 321689806