Chinaunix首页 | 论坛 | 博客
  • 博客访问: 350426
  • 博文数量: 89
  • 博客积分: 2919
  • 博客等级: 少校
  • 技术积分: 951
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-23 11:51
个人简介

好懒,什么都没写

文章分类

全部博文(89)

文章存档

2012年(3)

2011年(17)

2007年(20)

2006年(49)

我的朋友

分类: LINUX

2006-05-23 13:13:37




///////////////////////////////////////////////////////////
//time-stamp:<2006-05-30 11:15:50>
(custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 '(case-fold-search t)
 '(current-language-environment "Chinese-GB")
 '(default-input-method "chinese-py-punct")
 '(global-font-lock-mode t nil (font-lock))
 '(show-paren-mode t nil (paren))
 '(standard-indent 4)
 '(tab-always-indent t))
(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 '(default ((t (:stipple nil :background "dark slate gray" :foreground "goldenrod" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 131 :width normal :family "outline-courier new"))))
 '(cursor ((t (:background "moccasin")))))



(setq default-major-mode 'text-mode)

(mouse-avoidance-mode 'animate)

(show-paren-mode t)
(setq show_paren-style 'parenttheses)

(setq column-number-mode t)

(setq inhibit-startup-message t)

(setq visible-bell t)

(setq display-time-24hr-format t)

(setq defaule-tab-width 4)

(add-hook 'text-mode-hook 'turn-on-auto-fill)
(setq user-full-name "yechao")

;;显示日期
;(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")


;;设置行号,开启命令:M-x setnu-mode
;;(require 'setnu)



;;You can use M-x hs-minor-mode to enable or disable this mode,
;;or add hs-minor-mode to the mode hook for certain major modes
;;in order to enable it automatically for those modes.
;;代码折叠
(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)
(add-hook 'c-mode-hook 'hs-minor-mode)
(add-hook 'cc-mode-hook 'hs-minor-mode)

;;to use the Foldout package, you can type M-x load-library RET foldout RET;
;;or you can arrange for to do that automatically by putting this in your `.emacs' file:
;;(eval-after-load "outline" '(require 'foldout))




;;开启图片浏览
;;(require 'thumbs)
;;(auto-image-file-mode t)

;; 如果设置为 t,光标在 TAB 字符上会显示为一个大方块 :)。
;;(setq x-stretch-cursor nil)

; 光标不要闪烁。
;(blink-cursor-mode -1)

;; 在modline显示语句所属函数名称
(which-func-mode t)                            

;; newline and indent
;;(define-key c-mode-base-map [(return)] 'newline-and-indent)

;;Then add the hook function time-stamp to the hook before-save-hook

(add-hook 'before-save-hook 'time-stamp)
(add-hook 'write-file-hooks 'time-stamp)

;;The next example shows how to use a hook to customize the indentation of C code
(setq my-c-style
       '((c-comment-only-line-offset . 4)
         (c-cleanup-list . (scope-operator
                    empty-defun-braces
                    defun-close-semi))
         (c-offsets-alist . ((arglist-close . c-lineup-arglist)
                 (substatement-open . 0)))))
    
     (add-hook 'c-mode-common-hook
       '(lambda ()
          (c-add-style "my-style" my-c-style t)))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; time-stamp: add a time stamp at the
;;; beginning of a file.
(add-hook 'write-file-hooks 'time-stamp)






阅读(888) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~