;; This is needed for Erlang mode setup
(setq erlang-root-dir "F:/erlang-dev/erlang-home/erl5.9.1")
(setq load-path (cons "F:/erlang-dev/erlang-home/erl5.9.1/lib/tools-2.6.7/emacs" load-path))
(setq exec-path (cons "F:/erlang-dev/erlang-home/erl5.9.1/bin" exec-path))
(require 'erlang-start)
;; This is needed for Distel setup
(let ((distel-dir "F:/erlang-dev/erlang-home/erl5.9.1/lib/distel-4.03/elisp"))
(unless (member distel-dir load-path)
;; Add distel-dir to the end of load-path
(setq load-path (append load-path (list distel-dir)))))
(require 'distel)
(distel-setup)
;; Some Erlang customizations
(add-hook 'erlang-mode-hook
(lambda ()
;; when starting an Erlang shell in Emacs, default in the node name
(setq inferior-erlang-machine-options '("-sname" "emacs"))
;; add Erlang functions to an imenu menu
(imenu-add-to-menubar "imenu")))
;; A number of the erlang-extended-mode key bindings are useful in the shell too
(defconst distel-shell-keys
'(("\C-\M-i" erl-complete)
("\M-?" erl-complete)
("\M-." erl-find-source-under-point)
("\M-," erl-find-source-unwind)
("\M-*" erl-find-source-unwind)
)
"Additional keys to bind when in Erlang shell.")
(add-hook 'erlang-shell-mode-hook
(lambda ()
;; add some Distel bindings to the Erlang shell
(dolist (spec distel-shell-keys)
(define-key erlang-shell-mode-map (car spec) (cadr spec)))))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(transient-mark-mode (quote identity)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;;设置个人信息
(setq user-full-name "Estone")
(setq user-mail-address "estone@yeah.net")
;在标题栏提示你目前所在位置.
(setq frame-title-format '("Emacs@"system-name": %b %+%+ %f"))
;;界面字体背景颜色主题
(set-foreground-color "black")
(set-background-color "white")
(set-cursor-color "black")
(set-mouse-color "black")
(set-default-font "Consolas-10")
;;禁用启动信息
(setq inhibit-startup-message t)
;;关闭烦人的出错时的提示声
(setq visible-bell t)
;; 设置光标为竖线
(setq-default cursor-type 'bar)
;;Tab设置4
(setq default-tab-width 4)
(setq tab-width 4)
;;光标靠近鼠标的时候,让鼠标自动让开,别挡住视线
;;(mouse-avoidance-mode 'animate)
;;下面的这个设置可以让光标指到某个括号的时候显示与它匹配的括号
(show-paren-mode t)
(setq show-paren-style 'parentheses)
;; 加载显示行号模块
(require 'linum)
(setq linum-format "%3d ")
;对所有文件生效
(add-hook 'find-file-hooks (lambda () (linum-mode 1)))
;;显示当前所在的行号和列号
(column-number-mode t)
;;防止页面滚动时跳动
(setq scroll-margin 3
scroll-conservatively 10000)
;; 所有的备份文件转移到~/backups目录下
;(setq backup-directory-alist (quote (("." . "~/backups"))))
;(setq version-control t)
;(setq kept-old-versions 2)
;(setq kept-new-versions 5)
;(setq delete-old-versions t)
;(setq backup-directory-alist '(("." . "~/backups")))
;(setq backup-by-copying t)
;; Emacs 中,改变文件时,默认都会产生备份文件(以 ~ 结尾的文件)。可以完全去掉
;; (并不可取),也可以制定备份的方式。这里采用的是,把所有的文件备份都放在一
;; 个固定的地方("~/var/tmp")。对于每个备份文件,保留最原始的两个版本和最新的
;; 五个版本。并且备份的时候,备份文件是复本,而不是原件。
;;不产生备份文件
(setq make-backup-files nil)
;;设置kill-ring-max(我不知道怎么翻译这个词:)为200,以防不测:)
(setq kill-ring-max 200)
;; 当有两个文件名相同的缓冲时,使用前缀的目录名做 buffer 名字,不用原来的
;; foobar<!----> 形式。
(setq uniquify-buffer-name-style 'forward)
;;显示日期
(setq display-time-day-and-date t)
(display-time)
;;显示时间
(setq display-time-24hr-format t)
(setq display-time-day-and-date t)
(setq display-time-use-mail-icon t)
(setq display-time-interval 10)
;; 设置时间戳,标识出最后一次保存文件的时间。
(setq time-stamp-active t)
(setq time-stamp-warn-inactive t)
(setq time-stamp-format "%:y-%02m-%02d %3a %02H:%02M:%02S K.T")
;;设置默认工作目录
(setq default-directory "F:/erlang-dev/erlang-workspace")
;;'y' for 'yes', 'n' for 'no'
(fset 'yes-or-no-p 'y-or-n-p)
;; 代码折叠
(load-library "hideshow")
(add-hook 'java-mode-hook 'hs-minor-mode)
(add-hook 'perl-mode-hook 'hs-minor-mode)
(add-hook 'php-mode-hook 'hs-minor-mode)
(add-hook 'emacs-lisp-mode-hook 'hs-minor-mode)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 启动最大化窗口设置 - START
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;(defun w32-restore-frame ()
;; "Restore a minimized frame"
;; (interactive)
;; (w32-send-sys-command 61728))
;; (defun w32-maximize-frame ()
;; "Maximize the current frame"
;; (interactive)
;; (w32-send-sys-command 61488))
;;; Maximum Windows Frame
;;(w32-maximize-frame)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 启动最大化窗口设置 - END
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;(autoload 'project-mode "project-mode" "Project Mode" t)
分享到:
相关推荐
本配置文件基于网上提供的其他配置文件进行修改。 支持: emacs 24 +cedet 1.1 +ecb 2.40 源配置文件下载地址: http://download.csdn.net/detail/karotte/3812760
我的emacs配置文件 linux 下载后解压到用户家目录下面,即可使用。 可能有的会出错,自己相应地修改.emacs文件即可。
emacs配置文件的修正版,网上现有的emacs.d很多都缺少部分文件。另外如何配置可参考本人的blog文章:emacs配置。
这是我的emacs配置文件,和我的blog相对应的
emacs config file, emacs编辑器的一个配置文件
emacs配置文件,针对emacs23.1 emacs配置文件,针对emacs23.1 emacs配置文件,针对emacs23.1 emacs配置文件,针对emacs23.1
emacs 配置文件(已经测试适合Windows和Linux),已经包含了各个扩展,主要的功能: 基本功能: 1. 设置colortheme 2. 共享系统剪贴板 3. 显示括号匹配 4. 用y-n取代yes-no 5. 用法高亮 6. 显示时间 7. 自动保存session...
erlang的emacs环境搭建,其实网上有好多教程,下载地址也有,我这个是把需要的软件下载好了的,并且配置好了的,主要是方便不能下载软件的朋友。 包括.emacs.d .emacs .erlang.cookie distel-4.03.tgz Emacs-23-CvsP...
Emacs配置文件
自己备份的emacs配置文件,用于自己后续完善
一个比较简单的,仅用yasnippet,ecb,cedet三个插件的emacs配置文件
windows下安装emacs及添加配置文件代码
emacs配置文件.7z
Emacs配置文件(Windows) 解压后,修改一下注册表设置HOME表项,即可使用,相应地修改google
Emacs的配置文件,可以略加修改,适合不同的环境。
emacs常用配置... emacs常用配置...