(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(display-time-mode 1)
(show-paren-mode t)
(setq default-major-mode 'text-mode)
(auto-image-file-mode)
(global-font-lock-mode t)
(setq inhibit-startup-message t)
(setq global-linum-mode t)
(setq line-number-mode t)
(setq column-number-mode t)
(setq kill-ring-max 200)
(setq scroll-margin 3
scroll-conservatively 10000)
(setq default-tab-width 4)
(setq-default indent-tabs-mode nil)
(fset 'yes-or-no-p 'y-or-n-p)
(setq default-directory "~/Workspace/")
(setq version-control t)
(setq kept-new-versions 3)
(setq delete-old-versions t)
(setq kept-old-versions 2)
(setq dired-kept-versions 1)
(setq backup-by-copying t)
(setq backup-directory-alist '(("."."~/.emacs.d/backup")))
(setq auto-save-file-name-transforms '(("\\`/?\\([^/]*/\\)*\\([^/]*\\)\\'" "~/.emacs.d/backup/\\2" t)))
; bind keys
(global-set-key "\C-x\C-m" 'execute-extended-command)
(global-set-key "\C-c\C-m" 'execute-extended-command)
(global-set-key "\C-w" 'backward-kill-word)
(global-set-key "\C-x\C-k" 'kill-region)
(global-set-key "\C-c\C-k" 'kill-region)
; C mode
(setq c-basic-offset 4)
(setq user-full-name "Tristan Sun")
(setq user-mail-address "ting.sun@renren-inc.com")
(setq frame-title-format "emacs@%b")
; color-theme plugin
(add-to-list 'load-path "~/.emacs.d/plugin/color-theme")
(require 'color-theme)
(color-theme-initialize)
;(color-theme-pok-wob)
(color-theme-dark-blue2)
; git-emacs plugin
;(add-to-list 'load-path "~/.emacs.d/plugin/git-emacs")
;(require 'git-emacs)
; yasnippet plugin
;(add-to-list 'load-path "~/.emacs.d/plugin/yasnippet")
;(require 'yasnippet-bundle)
; multi-term plugin
;(add-to-list 'load-path "~/.emacs.d/plugin/multi-term")
;(require 'multi-term)
;(setq multi-term-program "/bin/bash")
; cedet plugin
;(load-file "~/.emacs.d/plugin/cedet-1.1/common/cedet.el")
;(global-ede-mode 1)
;(semantic-load-enable-code-helpers)
;(global-srecode-minor-mode 1)
;(require 'semantic-ia)
;(require 'semantic-gcc)
; ecb
;(add-to-list 'load-path "~/.emacs.d/plugin/ecb-2.40")
;(require 'ecb)
; max frame
(add-to-list 'load-path "~/.emacs.d/plugin/maxframe")
(require 'maxframe)
(add-hook 'window-setup-hook 'maximize-frame t)
; custom startup window layout
(defun initial-window-layout ()
(interactive)
(split-window-horizontally)
(enlarge-window-horizontally 10)
(other-window 1)
(shell)
(other-window 1))
(initial-window-layout)
(defalias 'iwl 'initial-window-layout)
; stop asking "Active Process Exists; kill them and exit anyway"
(defadvice save-buffers-kill-emacs (around no-query-kill-emacs activate)
"Prevent annoying \"Active processes exist\" query when you quit Emacs."
(flet ((process-list ())) ad-do-it))
阅读(1454) | 评论(0) | 转发(0) |