2007年4月28日星期六

Emacs配置文件


;; For my language code setting (UTF-8)
(setq current-language-environment "UTF-8")
(setq default-input-method "chinese-py")
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)

;;(set-language-environment 'Chinese-GB)
;; (set-keyboard-coding-system 'utf-8)
(set-clipboard-coding-system 'utf-8)
;; (set-terminal-coding-system 'utf-8)
(set-buffer-file-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
;; (set-selection-coding-system 'utf-8)
(modify-coding-system-alist 'process "*" 'utf-8)
(setq default-process-coding-system '(utf-8 . utf-8))
(setq-default pathname-coding-system 'utf-8)
(set-file-name-coding-system 'utf-8)
(setq ansi-color-for-comint-mode t)


;; get around the Ctrl+SPACE key binding for inputing method
(global-set-key "\C-cm" 'set-mark-command)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(global-set-key [(meta left)] 'backward-sexp)
(global-set-key [(meta right)] 'forward-sexp)
(global-set-key [(meta g)] 'goto-line)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; highlight marked region
(transient-mark-mode t)

;; enable syntax highlight
(global-font-lock-mode t)

;; show column number on status bar
(setq column-number-mode t)

;; close toolbar
(tool-bar-mode)

;; enable mouse wheel support
(mouse-wheel-mode)
(put 'upcase-region 'disabled nil)
(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.
'(column-number-mode t)
'(current-language-environment "Chinese-GB")
'(ecb-options-version "2.32")
'(show-paren-mode t)
'(tab-width 4)
'(transient-mark-mode t))
(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 default-major-mode 'text-mode);
(fset 'yes-or-no-p 'y-or-n-p);
(scroll-bar-mode nil);
(mouse-avoidance-mode 'animate);
(setq x-select-enable-clipboard t);
(setq make-backup-files nil);
(load-file "/home/lizhi/myEmacs/color-theme.el")
;;(color-theme-dark-blue)
(color-theme-pok-wob)
;;(color-theme-blue-sea)

(setq inhibit-splash-screen t);
(setq default-process-coding-system '(utf-8-unix . utf-8-unix));

;;install speedbar
(add-to-list 'load-path "~/myEmacs/cedet-1.0pre3/speedbar/")
;;(autoload 'speedbar-frame-mode "speedbar" "Popup a speedbar frame" t)
;;(autoload 'speedbar-get-focus "speedbar" "Jump to speedbar frame" t)
(define-key-after (lookup-key global-map [menu-bar tools])
[speedbar] '("Speedbar" . speedbar-frame-mode) [calendar])
(global-set-key [(f4)] 'speedbar-get-focus)
;; Texinfo fancy chapter tags
;; (add-hook 'texinfo-mode-hook (lambda () (require 'sb-texinfo)))
;; HTML fancy chapter tags
;; (add-hook 'html-mode-hook (lambda () (require 'sb-html)))

;;install eieio
(add-to-list 'load-path "~/myEmacs/cedet-1.0pre3/eieio/")
;;install ede
(add-to-list 'load-path "~/myEmacs/cedet-1.0pre3/ede/")
;;install cogre
(add-to-list 'load-path "~/myEmacs/cedet-1.0pre3/cogre/")

;;install semantic
(add-to-list 'load-path "~/myEmacs/cedet-1.0pre3/semantic/")
;;(require 'semantic-load)
(setq semantic-load-turn-everything-on t)
(setq semantic-idle-scheduler-idle-time 432000)
;;(setq semantic-load-turn-useful-things-on t)
(load-file "~/myEmacs/cedet-1.0pre3/common/cedet.el")
(setq semanticdb-project-roots
(list "~/Desktop/compiler/"))

;;install cedet
(load-file "~/myEmacs/cedet-1.0pre3/common/cedet.el")

;;install ecb
(add-to-list 'load-path "~/myEmacs/ecb-2.32/")
(require 'ecb)

;;emacs server
(server-start)

;;image view
(require 'thumbs)
(auto-image-file-mode t)

(show-paren-mode t)

(global-set-key [f5] 'gnus) ; 启动新闻组客户端 gnus
(global-set-key [f6] 'eshell) ; 一个 elisp 写的 shell
(global-set-key [f11] 'compile) ; 在 Emacs 中编译
(global-set-key [f12] 'gdb) ; 在 Emacs 中调试

(global-set-key "\C-xk" 'kill-this-buffer)
(global-set-key "\M-/" 'hippie-expand)

;;mini buffer
(setq rezize-mini-windows nil)

;;cc-mode
(add-hook 'c-mode-hook
'(lambda()
(c-set-style "linux")
(c-toggle-auto-state)))
(setq comment-multi-line t)
;;(define-key c-mode-base-map "\M-/" 'semantic-ia-complete-symbol-menu)

;;emacs-w3m
(require 'w3m-load)

;;dired
(setq dired-recursive-copies t)
(setq dired-recursive-deletes t)
;;(add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)

;;display-time
(setq display-time-24hr-format t)
(setq display-time-day-and-date t)
(setq dispaly-time-use-mail-icon t)
(setq display-time-interval 10)
(display-time-mode 1)

;;calendar
(setq calendar-latitude +45.75)
(setq calendar-longitude +126.63)
(setq calendar-location-name "Harbin")

;; hippie-expand
(setq hippie-expand-try-functions-list
'(try-expand-line
try-expand-line-all-buffers
try-expand-list
try-expand-list-all-buffers
try-expand-dabbrev
try-expand-dabbrev-visible
try-expand-dabbrev-all-buffers
try-expand-dabbrev-from-kill
try-complete-file-name
try-complete-file-name-partially
try-complete-lisp-symbol
try-complete-lisp-symbol-partially
try-expand-whole-kill))

;;(require 'uniquify)
(require 'flyspell)

(add-to-list 'load-path "/home/lizhi/myEmacs/lisp/")
;;boxquote
;;(require 'boxquote)
(load-file "/home/lizhi/myEmacs/boxquote.elc")
;;svn
(require 'psvn)

没有评论: