(setq load-path (cons "~/.emacs.d/" load-path))
(load-file "~/.emacs.d/conf/org-init.el")
;(load-file "~/.emacs.d/conf/emms-init.el")
(setq custom-file "~/.emacs.d/.emacs_custom.el")
(setq bookmark-default-file "~/.emacs.d/.emacs.bmk")
(setq abbrev-file-name "~/.emacs.d/.abbrev_defs")
; Change backup behavior
(setq backup-directory-alist '(("." . "~/tmp/"))
backup-by-copying t
version-control t
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
)
;;;; color
;(global-font-lock-mode 0)
(setq default-frame-alist
(append default-frame-alist
'((foreground-color . "#939392")
(background-color . "#121211")
)))
;;; support for screen-256color
; http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=2650
(load "term/xterm")
(defun terminal-init-screen ()
"Terminal initialization function for screen."
;; Use the xterm color initialization code.
(xterm-register-default-colors)
(tty-set-up-initial-frame-faces))
;;;; font
;; http://emacs-fu.blogspot.com/2009/06/setting-fonts.html
;; .Xresources (一般設這個就好!)
;; echo "Emacs.Font: Monospace-12" >> ~/.Xresources
;(set-default-font "DejaVu Sans Mono-12")
;(if window-system
; (set-fontset-font (frame-parameter nil 'font)
; 'han '("WenQuanYi Zen Hei Mono" . "unicode-bmp"))
;)
;(server-start) ;; Multi-TTY
(setq inhibit-startup-screen t)
;(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(setq column-number-mode t)
(blink-cursor-mode 0)
(setq visible-bell t)
(setq woman-use-own-frame nil)
(show-paren-mode t)
(setq-default line-spacing 5) ;; 修改行距
(iswitchb-mode t) ;; C-x b
(fset 'yes-or-no-p 'y-or-n-p)
(setq default-major-mode 'text-mode)
(auto-compression-mode 1)
(delete-selection-mode t)
(setq require-final-newline t)
(size-indication-mode t)
(setq mouse-yank-at-point t)
;; Make URLs in comments/strings clickable
(add-hook 'find-file-hooks 'goto-address-prog-mode)
;; C-\ 行列 ; C-u C-\ chinese-zozy 注音
(setq default-input-method "chinese-array30")
(require 'uniquify) ;; 改變重覆的檔名
(setq uniquify-buffer-name-style 'forward)
;; time-stamp
(setq time-stamp-active t)
(add-hook 'write-file-hooks 'time-stamp)
;;shell
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
;; ansi-term
(setq ansi-term-color-vector
[unspecified "#000000" "#963F3C" "#5FFB65" "#FFFD65"
"#0082FF" "#FF2180" "#57DCDB" "#FFFFFF"])
;{{{ Keybinding
;; Disable C-z on X11 sessions
(when window-system
(global-unset-key "\C-z")
)
;; hippie-expand
(global-set-key (kbd "M-/") 'hippie-expand)
;; Change C-x C-b behavior
(global-set-key "\C-x\C-b" 'ibuffer)
;; 可以用 shift + the arrow keys 代替
(global-set-key (kbd "C-x <SPC>") 'set-mark-command)
(global-set-key [f8] 'xterm-mouse-mode)
(global-set-key [f9] 'linum-mode)
;; ansi-term
;; http://hide1713.wordpress.com/2009/01/10/how-i-use-emacs-ansi-term/
(defun switch-to-ansi-term ()
(interactive)
(if (get-buffer "*ansi-term*")
(switch-to-buffer "*ansi-term*")
(ansi-term "/usr/bin/zsh")))
(global-set-key [f12] 'switch-to-ansi-term)
;}}}
;; ccrypt
;(require 'jka-compr-ccrypt)
;;;; calendar
(setq calendar-latitude +25.02)
(setq calendar-longitude +121.31)
(setq calendar-location-name "台北")
;;;; w3m
(setq w3m-use-favicon nil)
(setq w3m-command-arguments '("-cookie" "-F"))
(setq w3m-use-cookies t)
(setq w3m-home-page "http://www.google.com.tw/")
|