emacs - switch to help windows split windows
[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
20 (require 'my-packages)
21
22 (require 'init-color-theme)
23 ;(require 'init-ido)
24 (require 'init-magit)
25 ;(require 'init-evil)
26 (require 'init-project)
27 (require 'init-ggtags)
28
29 (setq scroll-margin 5)
30 (setq scroll-conservatively 10000)
31 (show-paren-mode t)
32
33
34 ;;;; conflict with C-c . in org-mode, disable it temporarily
35 ;;;;(require 'init-c-cpp)
36 (require 'init-key-binding)
37 (require 'init-winner)
38 (require 'init-minibuffer)
39
40
41 ;; http://stackoverflow.com/questions/11484225/fix-an-auto-complete-mode-and-linum-mode-annoyance
42 ;;;(ac-linum-workaround)
43
44
45 (require 'init-mode-line)
46 (require 'init-workgroup2)
47 (require 'init-perl)
48
49 ;(add-to-list 'load-path "~/.emacs.d/Emacs-PDE-0.2.16/lisp/")
50 ;(load "pde-load")                       ;
51
52 (require 'init-linum)
53
54 (require 'auto-complete)
55 (require 'auto-complete-config)
56 (ac-config-default)
57
58
59 (require 'init-helm)
60
61 ;; page break configuration
62 ;(require 'pp-c-l)
63 ;(pretty-control-l-mode 1)
64
65 ;; persist command history of helm
66 ;(require 'session)
67 ;(add-hook 'after-init-hook 'session-initialize)
68
69
70 (require 'use-package)
71
72 ;; persist command history of helm
73 (use-package savehist
74   :init (savehist-mode)
75   :config
76   (setq history-length 1000
77         history-delete-duplicates t
78         savehist-additional-variables '(extended-command-history))) 
79
80 ;;(savehist-mode)
81 ;;  (setq history-length 1000
82 ;;        history-delete-duplicates t
83 ;;        savehist-additional-variables '(extended-command-history)) 
84
85 ;    (setq split-height-threshold 0)
86
87
88
89
90
91 ;;;(require 'helm-gtags)
92 ;;;;(require 'setup-helm-gtags)
93 ;;;;(helm-gtags-mode 1)
94 ;;;;;; Enable helm-gtags-mode
95 ;;;(add-hook 'c-mode-hook 'helm-gtags-mode)
96 ;;;(add-hook 'c++-mode-hook 'helm-gtags-mode)
97 ;;;(add-hook 'asm-mode-hook 'helm-gtags-mode)
98 ;;;
99 ;;;;; customize
100 ;;;(custom-set-variables
101 ;;; '(helm-gtags-path-style 'relative)
102 ;;; '(helm-gtags-ignore-case t)
103 ;;; '(helm-gtags-auto-update t))
104 ;;;
105 ;;;;; key bindings
106 ;;;(eval-after-load "helm-gtags"
107 ;;;  '(progn
108 ;;;     (define-key helm-gtags-mode-map (kbd "M-t") 'helm-gtags-find-tag)
109 ;;;     (define-key helm-gtags-mode-map (kbd "M-r") 'helm-gtags-find-rtag)
110 ;;;     (define-key helm-gtags-mode-map (kbd "M-s") 'helm-gtags-find-symbol)
111 ;;;     (define-key helm-gtags-mode-map (kbd "M-g M-p") 'helm-gtags-parse-file)
112 ;;;     (define-key helm-gtags-mode-map (kbd "C-c <") 'helm-gtags-previous-history)
113 ;;;     (define-key helm-gtags-mode-map (kbd "C-c >") 'helm-gtags-next-history)
114 ;;;     (define-key helm-gtags-mode-map (kbd "M-,") 'helm-gtags-pop-stack)))
115
116
117 ;(require 'icicles)
118 ;(icy-mode 1)
119
120
121 (require 'init-org)
122 (setq help-window-select t)