Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4314
  • 博文数量: 3
  • 博客积分: 90
  • 博客等级: 民兵
  • 技术积分: 32
  • 用 户 组: 普通用户
  • 注册时间: 2012-09-05 23:37
文章分类
文章存档

2012年(3)

我的朋友
最近访客

分类: LINUX

2012-09-06 22:15:16

;; creates a menu item File -> Open recent
(require 'recentf)
(recentf-mode 1)

;; display the current column number
(setq column-number-mode t)

;;把title设置为“文件名@move's Emacs"
(setq frame-title-format "%b@move's Emacs")


;;显示行号,快速定位行
(global-linum-mode 1)
(global-set-key [(meta g)] 'goto-line)


;;设置模式
(require 'cc-mode)

;;把c语言风格设置为k&r风格
(add-hook 'c-mode-hook '(lambda ()(c-set-style "k&r")))

;;关闭出错时的提示声
(setq visible-bell t)

;;set c++ style as stroustrup style
(add-hook 'c++-mode-hook '(lambda()(c-set-style "stroustrup")))


;;配置gdb的多窗口界面
(setq gdb-many-windows t)
;; C-f5, 设置编译命令
;; C-f6, 调用GDB命令
;;f5, 保存所有文件然后编译当前窗口文件
;;f7
;;f8
;;f9
;;f10
(global-set-key [(C-f5)] 'compile)
(setq-default compile-command "make")
(global-set-key [(C-f6)] 'gdb)
(setq-default gdb-command "gdb --annotate=3 debug/test.exe")
(global-set-key [(f5)] 'gud-go)
(global-set-key [(f7)] 'gud-step)
(global-set-key [(f8)] 'gud-next)
;;(global-set-key [(f9)] 'gud-until)
;;(global-set-key [(f10)] 'gud-cont)


;;下面的这个设置可以让光标指到某个括号的时候显示与它匹配的括号
(show-paren-mode t)
(setq show-paren-style 'parentheses)


;; 打开图片显示功能
(auto-image-file-mode t)

;; 设置tab键为4个空格的宽度
(setq default-tab-width 4)

;; 支持emacs和外部程序的粘贴
(setq x-select-enable-clipboard t)

;; 语法高亮
(global-font-lock-mode t)

;颜色配置
(load-file "E:/emacs/emacs-24.1/site-lisp/color-theme-6.6.0/color-theme.el")
(require 'color-theme)
;;(color-theme-dark-blue)
(color-theme-initialize)
(color-theme-classic)


;;鼠标滚轮,默认的滚动太快,这里改为3行
(defun up-slightly () (interactive) (scroll-up 3))
(defun down-slightly () (interactive) (scroll-down 3))

;;启用时间显示设置,在minibuffer上面的那个杠上(忘了叫什么来着)
(display-time-mode 1)

;;时间使用24小时制
(setq display-time-24hr-format t)

;;时间显示包括日期和具体时间
(setq display-time-day-and-date t)

;;显示时间,格式如下
(display-time-mode 1)

(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.
 '(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
 '(current-language-environment "UTF-8")
 '(scroll-bar-mode nil)
 '(size-indication-mode t)
 '(tool-bar-mode nil)
 '(tooltip-mode nil))
(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.
 '(default ((t (:family "Consolas" :foundry "outline" :slant normal :weight normal :height 113 :width normal)))))

阅读(518) | 评论(0) | 转发(0) |
0

上一篇:Emacs Commands List

下一篇:没有了

给主人留下些什么吧!~~