emacs : change chinese font
[dotfiles.git] / emacs.d / init.el
1 ;;;(if (eq system-type 'darwin)
2 ;;;  (setenv "PATH"
3 ;;;)   (concat (getenv "path") ":/usr/local/bin:~/bin/")
4 ;;;  )
5
6
7 (setenv "PATH" (concat (getenv "PATH") ":/usr/local/bin"))
8 (setq exec-path (append exec-path '("/usr/local/bin")))
9
10 (setq debug-on-error t)
11
12
13 (add-to-list 'load-path "~/.emacs.d/config")
14
15 (global-set-key "\C-s" 'isearch-forward-regexp)
16 (global-set-key "\C-r" 'isearch-backward-regexp)
17
18 (require 'init-base)
19 (require 'init-font)
20
21 (require 'my-packages)
22
23 (require 'init-color-theme)
24 ;(require 'init-ido)
25 (require 'init-magit)
26 ;(require 'init-evil)
27 (require 'init-project)
28 (require 'init-ggtags)
29
30 (setq scroll-margin 5)
31 (setq scroll-conservatively 10000)
32 (show-paren-mode t)
33
34
35 ;;;; conflict with C-c . in org-mode, disable it temporarily
36 ;;;;(require 'init-c-cpp)
37 (require 'init-key-binding)
38 (require 'init-winner)
39 (require 'init-minibuffer)
40
41
42 ;; http://stackoverflow.com/questions/11484225/fix-an-auto-complete-mode-and-linum-mode-annoyance
43 ;;;(ac-linum-workaround)
44
45
46 (require 'init-mode-line)
47 (require 'init-workgroup2)
48 (require 'init-perl)
49
50 ;(add-to-list 'load-path "~/.emacs.d/Emacs-PDE-0.2.16/lisp/")
51 ;(load "pde-load")                       ;
52
53 (require 'init-linum)
54
55 (require 'auto-complete)
56 (require 'auto-complete-config)
57 (ac-config-default)
58
59
60 (require 'init-helm)
61
62 ;; page break configuration
63 ;(require 'pp-c-l)
64 ;(pretty-control-l-mode 1)
65
66 ;; persist command history of helm
67 ;(require 'session)
68 ;(add-hook 'after-init-hook 'session-initialize)
69
70
71 (require 'use-package)
72
73 ;; persist command history of helm
74 (use-package savehist
75   :init (savehist-mode)
76   :config
77   (setq history-length 1000
78         history-delete-duplicates t
79         savehist-additional-variables '(extended-command-history))) 
80
81 ;;(savehist-mode)
82 ;;  (setq history-length 1000
83 ;;        history-delete-duplicates t
84 ;;        savehist-additional-variables '(extended-command-history)) 
85
86 ;    (setq split-height-threshold 0)
87
88
89
90
91
92 ;;;(require 'helm-gtags)
93 ;;;;(require 'setup-helm-gtags)
94 ;;;;(helm-gtags-mode 1)
95 ;;;;;; Enable helm-gtags-mode
96 ;;;(add-hook 'c-mode-hook 'helm-gtags-mode)
97 ;;;(add-hook 'c++-mode-hook 'helm-gtags-mode)
98 ;;;(add-hook 'asm-mode-hook 'helm-gtags-mode)
99 ;;;
100 ;;;;; customize
101 ;;;(custom-set-variables
102 ;;; '(helm-gtags-path-style 'relative)
103 ;;; '(helm-gtags-ignore-case t)
104 ;;; '(helm-gtags-auto-update t))
105 ;;;
106 ;;;;; key bindings
107 ;;;(eval-after-load "helm-gtags"
108 ;;;  '(progn
109 ;;;     (define-key helm-gtags-mode-map (kbd "M-t") 'helm-gtags-find-tag)
110 ;;;     (define-key helm-gtags-mode-map (kbd "M-r") 'helm-gtags-find-rtag)
111 ;;;     (define-key helm-gtags-mode-map (kbd "M-s") 'helm-gtags-find-symbol)
112 ;;;     (define-key helm-gtags-mode-map (kbd "M-g M-p") 'helm-gtags-parse-file)
113 ;;;     (define-key helm-gtags-mode-map (kbd "C-c <") 'helm-gtags-previous-history)
114 ;;;     (define-key helm-gtags-mode-map (kbd "C-c >") 'helm-gtags-next-history)
115 ;;;     (define-key helm-gtags-mode-map (kbd "M-,") 'helm-gtags-pop-stack)))
116
117
118 ;(require 'icicles)
119 ;(icy-mode 1)
120
121
122 (require 'init-org)
123 (setq help-window-select t)
124
125
126   (add-to-list 'load-path "~/.emacs.d/site-lisp/eim")
127   (autoload 'eim-use-package "eim" "Another emacs input method")
128
129   (register-input-method
130    "eim-wb" "euc-cn" 'eim-use-package
131    "五笔" "汉字五笔输入法" "~/.emacs.d/site-lisp/eim/wb.txt")
132   (register-input-method
133    "eim-py" "euc-cn" 'eim-use-package
134    "拼音" "汉字拼音输入法" "~/.emacs.d/site-lisp/eim/py.txt")
135
136