1 ;;;(if (eq system-type 'darwin)
3 ;;;) (concat (getenv "path") ":/usr/local/bin:~/bin/")
7 (setenv "PATH" (concat (getenv "PATH") ":/usr/local/bin"))
8 (setq exec-path (append exec-path '("/usr/local/bin")))
10 (setq debug-on-error t)
13 (add-to-list 'load-path "~/.emacs.d/config")
17 (require 'my-packages)
19 (require 'init-color-theme)
27 (require 'init-project)
29 (require 'projectile-speedbar)
32 (require 'init-ggtags)
35 (setq scroll-margin 5)
36 (setq scroll-conservatively 10000)
44 (setq recentf-max-menu-items 100)
47 (require 'recentf-ext)
49 (require 'init-key-binding)
53 (global-set-key (kbd "C-c C-l") 'winner-redo)
54 (global-set-key (kbd "C-c C-h") 'winner-undo)
61 ;;; set font size of minibuffer
62 ;;;; http://stackoverflow.com/questions/7869429/altering-the-font-size-for-the-emacs-minibuffer-separately-from-default-emacs
63 (add-hook 'minibuffer-setup-hook 'my-minibuffer-setup)
64 (defun my-minibuffer-setup ()
65 (set (make-local-variable 'face-remapping-alist)
66 '((default :height 120))))
70 (add-hook 'minibuffer-setup-hook
72 (make-local-variable 'face-remapping-alist)
73 (add-to-list 'face-remapping-alist '(default (:background "green")))))
78 ;;;;;(require 'escape)
79 ;(setq-default evil-escape-delay 0.2)
80 ;(setq evil-escape-excluded-major-modes '(dired-mode))
81 ;(setq-default evil-escape-key-sequence "jj")
89 ;(setq recentf-max-menu-items 100)
91 ;; http://www.emacswiki.org/emacs/RecentFiles
92 (defun recentf-ido-find-file ()
93 "Find a recent file using Ido."
95 (let ((file (ido-completing-read "Choose recent file: " recentf-list nil t)))
101 ;; http://stackoverflow.com/questions/11484225/fix-an-auto-complete-mode-and-linum-mode-annoyance
102 (ac-linum-workaround)
105 ;; ---------------------------------
109 (custom-set-variables
110 ;; custom-set-variables was added by Custom.
111 ;; If you edit it by hand, you could mess it up, so be careful.
112 ;; Your init file should contain only one such instance.
113 ;; If there is more than one, they won't work right.
114 '(fringe-mode (quote (4 . 0)) nil (fringe))
115 '(ggtags-split-window-function (quote split-window-vertically))
118 ((c-mode . "\\(\\\\\\([0-7]\\{1,3\\}\\|x[[:xdigit:]]+\\|u[[:xdigit:]]\\{4\\}\\|U[[:xdigit:]]\\{8\\}\\|[\"'?\\abfnrtv]\\)\\)")
119 (cperl-mode . "\\(\\\\\\([0-7]\\{1,3\\}\\|x[[:xdigit:]]+\\|u[[:xdigit:]]\\{4\\}\\|U[[:xdigit:]]\\{8\\}\\|[\"'?\\abfnrtv]\\)\\)")
120 (c++-mode . "\\(\\\\\\([0-7]\\{1,3\\}\\|x[[:xdigit:]]+\\|u[[:xdigit:]]\\{4\\}\\|U[[:xdigit:]]\\{8\\}\\|[\"'?\\abfnrtv]\\)\\)")
121 (objc-mode . "\\(\\\\\\([0-7]\\{1,3\\}\\|x[[:xdigit:]]+\\|u[[:xdigit:]]\\{4\\}\\|U[[:xdigit:]]\\{8\\}\\|[\"'?\\abfnrtv]\\)\\)")
122 (java-mode . "\\(\\\\\\([0-7]\\{1,3\\}\\|u[[:xdigit:]]\\{4\\}\\|[\"'\\bfnrt]\\)\\)")
123 (js-mode . "\\(\\\\\\([0-7]\\{1,3\\}\\|x[[:xdigit:]]\\{2\\}\\|u[[:xdigit:]]\\{4\\}\\|.\\)\\)")
124 (js2-mode . "\\(\\\\\\([0-7]\\{1,3\\}\\|x[[:xdigit:]]\\{2\\}\\|u[[:xdigit:]]\\{4\\}\\|.\\)\\)")
126 ("\\(\\\\\\([0-7]\\{1,3\\}\\|x[[:xdigit:]]\\{1,2\\}\\|u\\(?:[[:xdigit:]]\\{4\\}\\|{[[:xdigit:]]\\{1,6\\}\\(?:[[:space:]]+[[:xdigit:]]\\{1,6\\}\\)*}\\)\\|.\\)\\)"
143 (quote ruby-syntax-expansion-allowed-p))
144 (ruby-syntax-expansion-allowed-p state)
148 (add-face-text-property
151 (quote hes-escape-backslash-face))
152 (add-face-text-property
155 (quote hes-escape-sequence-face))
158 '(org-agenda-files (quote ("~/Private/org/diary.org" "~/temp/org-note.org")))
159 '(powerline-text-scale-factor 0.85))
161 ;; maybe better to fix the size of line number rather scaled 0.8
162 ;; https://github.com/howardabrams/dot-files/blob/master/emacs.org
164 ;; custom-set-faces was added by Custom.
165 ;; If you edit it by hand, you could mess it up, so be careful.
166 ;; Your init file should contain only one such instance.
167 ;; If there is more than one, they won't work right.
168 '(highlight-current-line-face ((t (:background "gray22"))))
169 '(linum ((t (:background "#000000" :foreground "gray40" :height 0.8 :slant italic :weigth light))))
170 '(linum-relative-current-face ((t (:inherit linum :foreground "Yellow" :weight light :height 0.8))))
171 '(mode-line ((t (:foreground "#030303" :background "#bdbdbd" :box nil :family "Source Code Pro for Powerline" :height 100))))
172 '(mode-line-inactive ((t (:foreground "#f9f9f9" :background "#666666" :box nil :family "Source Code Pro for Powerline" :height 100)))))
175 ;; enable linum-relative in programming mode
176 ;https://github.com/howardabrams/dot-files/blob/master/emacs.org
177 (add-hook 'prog-mode-hook 'linum-mode)
180 ;; hight current line
181 (require 'highlight-current-line)
182 (highlight-current-line-on t)
187 (require 'workgroups2)
190 (setq wg-prefix-key (kbd "C-c z"))
191 (setq wg-session-file "~/.emacs.d/.emacs_workgroups")
192 (setq wg-mode-line-display-on t) ; Default: (not (featurep 'powerline))
193 (setq wg-flag-modified t) ; Display modified flags as well
194 (setq wg-mode-line-decor-left-brace "["
195 wg-mode-line-decor-right-brace "]" ; how to surround it
196 wg-mode-line-decor-divider ":")
199 (defalias 'perl-mode 'cperl-mode)
200 ;(setq cperl-invalid-face nil)
201 (setq cperl-invalid-face (quote off))
202 ;(add-hook 'prog-mode-hook '(lambda ()
203 ; (highlight-regexp "%[[:alpha:]]\\|\\\\[[:alpha:]]")))
205 (require 'highlight-escape-sequences)
207 ;(setq cperl-font-lock t)
208 (put 'hes-escape-backslash-face 'face-alias 'font-lock-builtin-face)
209 (put 'hes-escape-sequence-face 'face-alias 'font-lock-builtin-face)
212 ;(add-to-list 'load-path "~/.emacs.d/Emacs-PDE-0.2.16/lisp/")
215 (require 'init-linum)