;;启动时大小和屏幕的中的位置
(setq default-frame-alist
'((height . 30)(width . 90)(menubar-line . 20)(tool-bar-lines . 0)))
;;关闭开启画面
(setq inhibit-startup-message t)
;;; 添加Emacs搜索路径
(add-to-list 'load-path "~/_emacs")
(add-to-list 'load-path "~/_emacs/color-theme-6.6.0/")
(add-to-list 'load-path "~/_emacs")
;;配置颜色主题
(require 'color-theme)
(color-theme-initialize)
(color-theme-calm-forest)
;;文件标签
(require 'tabbar)
(tabbar-mode)
;;(display-time)配置时间显示
(display-time-mode 1);;启动时间显示设置,在minibuffer上面的那个杠上
(setq display-time-24hr-format t);;时间使用24小时制
(setq display-time-day-and-date t);; 时间显示包括日期和具体时间
;;;;;键盘绑定 向上向下: 不同类别文件 向左向右: 同类文件切换
;;(global-set-key 'tabbar-backward-group)
;;(global-set-key [(control f10)] 'tabbar-local-mode)
(global-set-key [(control up)] 'tabbar-forward-group)
(global-set-key [(control down)] 'tabbar-backward-group)
(global-set-key [(control right)] 'tabbar-forward)
(global-set-key [(control left)] 'tabbar-backward)
;; 关闭菜单栏、工具条、滚动条
;(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
;;显示括号匹配
(show-paren-mode t)
;;括号匹配时显示另外一边的括号,而不是跳到另一个括号
(setq show-paren-style 'parentheses)
;;显示所在行号和列号
(column-number-mode t)
;; 光标显示为一竖线
(setq-default cursor-type 'bar)
;; 不要问 yes-or-no,只问 y-or-n
(fset 'yes-or-no-p 'y-or-n-p)
;; 关闭工具栏
(tool-bar-mode -1)
;; 正在编辑的文件被其他程序修改时,自动更新缓存区
(global-auto-revert-mode 1)
(setq view-read-only t)
;;禁用菜单栏,F10 开启关闭菜单
;(menu-bar-mode nil)
;;用空格代替TAB
;(setq-default indent-tabs-mode nil)
;;写文件时的默认编码
(setq buffer-file-coding-system 'utf-8)
;;读文件时的编码
(prefer-coding-system 'utf-8)
(when (eq window-system 'x) ; emacs和其它程序互相拷贝
(setq x-select-enable-clipboard t))
;;anything 简单太好用了!!!狂好用
;;用M-n和M-p命令可以进行上下选择
(eval-after-load 'anything
'(progn
(setq anything-enable-digit-shortcuts t)
))
(eval-after-load 'anything-config
'(add-to-list 'anything-sources anything-c-source-file-cache))
(require 'anything)
;(require 'anything-config)
(global-set-key [f5] 'anything)
;;当你在shell、telnet、w3m等模式下时,必然碰到过要输入密码的情况,此时加密显出你的密码
(add-hook 'comint-output-filter-functions
'comint-watch-for-password-prompt)
(put 'dired-find-alternate-file 'disabled nil)