`
dogstar
  • 浏览: 273437 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

emacs 使用备忘

阅读更多
1.最新的windows下编译版本地址如下:
[url]http://code.google.com/p/emacs-for-windows/ [/url]

引用

顺便记下修改 .emacs 文件以后不需要重启的方法:  M-x eval-buffer


2. .emacs配置文件如下:
;;;; 显示时间  
(setq display-time-24hr-format t)  
(setq display-time-day-and-date t)  
(display-time)  
;;;; 关闭启动画面  
(setq inhibit-startup-message t)  
;;;;设置大的kill ring  
(setq kill-ring-max 150)  
(tool-bar-mode nil);去掉那个大大的工具栏  
(scroll-bar-mode nil);去掉滚动条,因为可以使用鼠标滚轮了 ^_^  
(setq x-select-enable-clipboard t);支持emacs和外部程序的粘贴  
(font-lock-mode t) ; 开启语法高亮  
'(tab-width 2) ;;'(tab-width 4)

;;字体设置
(setq w32-charset-info-alist
      (cons '("gbk" w32-charset-gb2312 . 936) w32-charset-info-alist))
(setq default-frame-alist
      (append
       '((font . "fontset-gbk")) default-frame-alist))
(create-fontset-from-fontset-spec
"-outline-Consolas-normal-r-normal-normal-14-97-96-96-c-*-fontset-gbk")


;;plugin install
 ;;color theme   
(add-to-list 'load-path "~/.emacs.d/plugins/color-theme")  
(require 'color-theme)  
(color-theme-initialize)  
(color-theme-gray30)  
;;(color-theme-charcoal-black)  

;; hightlight current line 
(add-to-list 'load-path "~/.emacs.d/plugins/highlight-current-line")
(require 'highlight-current-line)
(highlight-current-line-on t)
;; To customize the background color 暗灰 DimGray
(set-face-background 'highlight-current-line-face "DimGray")

;;line number 行号
(add-to-list 'load-path "~/.emacs.d/plugins/linum")  
(require 'linum
(global-linum-mode t) 

 ;;yasnippet tab complete like textmate snippets  
(add-to-list 'load-path "~/.emacs.d/plugins/yasnippet")  
(require 'yasnippet)   
(yas/initialize)  
(yas/load-directory "~/.emacs.d/plugins/yasnippet/snippets/") ;snippets directory path  

 ;;js2-mode
(add-to-list 'load-path "~/.emacs.d/plugins/js2-mode")  
(require 'js2-mode)
;;(autoload 'js2-mode "js2-mode" "js editor 4 emacs" t)
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))

;;vim pulse vim in emacs 真邪恶:) ctrl+z 进行emacs vim之间的切换 
(setq viper-mode t)                ; enable Viper at load time
(setq viper-ex-style-editing nil)  ; can backspace past start of insert / line
(require 'viper)                   ; load Viper
(add-to-list 'load-path "~/.emacs.d/plugins/vimpulse")
(require 'vimpulse)                ; load Vimpulse
(setq woman-use-own-frame nil)     ; don't create new frame for manpages
(setq woman-use-topic-at-point t)  ; don't prompt upon K key (manpage display)
;;ctrl + r -> redo 
(require 'redo)
;;nice rectangle
(require 'rect-mark)

;;cedet
;; See cedet/common/cedet.info for configuration details.
(add-to-list 'load-path "~/.emacs.d/plugins/cedet/common")
(require 'cedet)
;; Enable EDE (Project Management) features
(global-ede-mode t)
;;speedbar key binding
(global-set-key [(f2)] 'speedbar-get-focus)
;;alt+/ 自动补全
(define-key c-mode-base-map [(meta ?/)] 'semantic-ia-complete-symbol-menu)

;;haskell-mode install
(add-to-list 'load-path "~/.emacs.d/plugins/haskell-mode")
(require 'haskell-mode)
;;(require 'haskell-site-file)
;;adding the following lines according to which modules you want to use:
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent) 



note:
引用
~ 为home目录,在C:\Documents and Settings\Administrator\Application Data\ 下。.emacs文件就在~下。第一启动emacs会在~目录下创建.emacs.d目录。我就在这个目录下创建一个plugin目录,存放我安装的插件。这样配置文件短点 :)。看管可以自行设定。


3.配置说明:
a.color theme 下载地址:http://download.gna.org/color-theme/。在plugins目录下创建color-theme目录,unpack到该目录。
也可以使用如下配置:
;;a.color theme 
(add-to-list 'load-path "~/.emacs.d/plugins/color-theme")
(require 'color-theme)
(color-theme-initialize)
(color-theme-gray30)


b.yasnappet 跟 snippet-mode 一样是模仿 TextMate 的自动完成功能的 emacs mode ,smart-snippet 和 yasnippet 的作者都是 pluskid (浙大学生)
下载地址:[url] http://code.google.com/p/yasnippet/[/url]。具体安装方式参照上。

剩下的都是一些配置文件,注释已经说明。
下面附上emacs的小抄pdf。
分享到:
评论

相关推荐

    emacs-cs:Emacs大备忘单(或备忘单或备忘单)

    Emacs备忘单通常会将这些操作整理成易于理解的表格或图形,用户可以根据需要随时查阅。 Emacs-cheat-sheet是这个项目的核心,它通常包含了一个详尽的Emacs功能列表,涵盖了基本操作到高级特性的方方面面。用户可以...

    emacs manual

    本文将基于《GNU Emacs Manual》第十六版(适用于Emacs 22.1版本),详细解析其核心功能与使用技巧。 #### 屏幕组织(The Organization of the Screen) Emacs通过分割屏幕来提供不同的工作区域。默认情况下,整个...

    emacs_cheatsheet:[备忘单]

    我的最小Emacs备忘单帮助击键行动Ch Ch 帮助系统帮助Ch k 描述击键命令Ch f 从函数名称描述命令Ch m 列出当前模式的键绑定Ch v 描述变量Ch b 描述当前缓冲区的绑定(以有序方式) Ch ? 帮助建议Cx 1 关闭*Help*缓冲...

    emacs-cheat:来自 Emacs 的作弊命令

    而通过学习 Elisp,你可以进一步提升 Emacs 的使用体验,将这个编辑器塑造成一个完全个性化的开发环境。如果你对这个主题感兴趣,那么“emacs-cheat-master”项目是一个很好的起点,可以让你深入理解 Emacs 的内部...

    paredit-cheatsheet:用于Paredit备忘单的新的,可扩展的源文档,在Emacs Wiki上以png形式提供。

    - **LaTeX与Emacs**:如果备忘单也涵盖了LaTeX使用,那么可能会涉及AUCTeX或其他LaTeX相关的Emacs模式,以及它们的快捷键和功能。 - **自定义与扩展**:Paredit备忘单的“可扩展性”意味着用户可以按照个人需求定制...

    magit-cheatsheet:magit的便捷备忘单,git的出色emacs模式

    如果您使用的是版本2(应该使用),请转到新,该除其他外还提供和[半官方refcard]( 。如果要从版本1更新到版本2,则还应该阅读。 魔导秘籍 magit是git的emacs模式,非常棒。 我出于个人目的将《 Magit用户手册》...

    med:D中的Micro Emacs

    med,D中的Micro Emacs 这是我的MicroEmacs版本,基于Dave Conroy的公共领域版本。 我喜欢它,因为它体积小,速度快,易于定制,并且可以随时随地移植到我需要在其上使用的任何计算机。 它是用编写的。 目前,它可以...

    emacs.d:我的emacs配置。 从头开始完全写

    这是我尝试在没有任何预配置设置的情况下开始使用Emacs的尝试。 我从争吵开始,并根据自己的经验添加内容。 如果您发现有严重错误或我应该调查的地方,请随时ping我。个人笔记停止与emacs战斗。 通过基础教程Ch t ...

    Linux 备忘手册.zip

    对于开发人员,Linux还提供了强大的开发工具,如GCC编译器、Git版本控制系统、Vim或Emacs编辑器等。 总之,Linux是一个深度和广度都极高的操作系统,无论你是作为普通用户还是开发者,都有无数的知识等待你去发掘。...

    常用命令(备忘与分享)

    标签“源码”和“工具”暗示了这份资料可能也涉及到了与源代码管理和开发工具相关的命令,例如Git版本控制系统,或者像Vim、Emacs这样的文本编辑器的使用。在Linux环境中,这些工具对于软件开发人员来说是必不可少的...

    CheatSheet:漂亮的备忘单或``参考卡'',可从组织文件中获取

    标题中的"CheatSheet"指的是在IT领域中广泛使用的备忘单或者称为“参考卡”,它是一种简洁、清晰的文档,通常包含重要的快捷键、命令、语法等信息,帮助用户快速回忆或学习某个软件或工具的使用技巧。在这个场景中,...

    AntiLeaf#Standard-Code-Library#备忘1

    备忘好东西合集带花树&HK笔记可持久化可并堆求k短路长链剖分学习笔记扩展埃氏筛法线性的证明(逃扩展埃氏筛法讲解Public Based Data Structu

    mu:maildir indexersearcher + emacs邮件客户端+ guile绑定

    亩 欢迎来到mu ! 注意:您正在查看开发分支,该分支正在开发和测试新代码,并且有时可能会中断。 相反,建议发行版和非冒险类用户使用1.4.x Release Branch 或选择。 鉴于许多人收集了大量电子... mu4e:在emacs

    LINUX 24学时教程

    18.4 使用emacs查看日历和管理约会 297 18.5 使用knote客户程序设置报时钟 299 18.6 课时小结 299 18.7 专家答疑 299 18.8 练习题 300 第19学时 使用StarOffice软件实现 家庭办公室管理 301 19.1 安装和配置...

    dotfiles:各种程序的配置文件和备忘单

    6. **其他应用配置**:可能还有其他应用程序的配置文件,如Emacs的`.emacs.d`,Sublime Text的`.sublime-settings`等。 掌握和理解自己的dotfiles是提升生产力的关键步骤,而研究他人的dotfiles则可以学习到新的...

    emoji-github:显示GitHub表情符号列表。 (备忘单)

    emoji-github:显示GitHub表情符号列表。 (备忘单)

    cheat_sheets:看起来很有帮助的命令。 向上

    在IT行业中,备忘单(Cheat Sheets)是一种非常实用的学习和参考工具,它们通常包含了一系列简洁、关键的指令或代码片段,可以帮助开发者快速回忆起...在实际使用中,可以根据具体需求选择对应的备忘单进行学习和应用。

    ClojureResources:汇编有用的资源来学习Clojure和一般的LISP

    Clojure资源汇编用于学习Clojure的有用资源,以汇总用于学习和理解Clojure(和LISP的资源)的资源。 [WIP]当我找到新资源时...服务器/ Web开发学习服务器/ Web开发项目资料库测验调试规格工具 [如何使用Emacs,出色的C

    [Objective-c程序设计].杨正洪等.扫描版

    7.3.6 emacs不是Mac程序91 7.3.7 任意搜索92 7.3.8 芝麻开门93 7.3.9 书签93 7.3.10 集中注意力94 7.3.11 开启导航条95 7.4 获取信息98 7.4.1 研究助手98 7.4.2 文档管理程序99 7.5 调试100 7.5.1 暴力调试100 7.5.2...

Global site tag (gtag.js) - Google Analytics