emacs: add move complete cedet to init-c-cpp.el
[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 (scroll-bar-mode -1)
13 (tool-bar-mode -1)
14 ;(menu-bar-mode -1)
15 (add-to-list 'default-frame-alist '(width  . 120))
16 (add-to-list 'default-frame-alist '(height . 40))
17 ;(add-to-list 'default-frame-alist '(font . "Source Code Pro for Powerline-12:weight:light" ))
18 (add-to-list 'default-frame-alist '(font . "Source Code Pro for Powerline-12" ))
19
20
21 (put 'set-goal-column 'disabled nil)
22 (setq vc-follow-symlinks t)
23 (setq visible-bell 1)
24 (setq ring-bell-function 'ignore)
25 (setq resize-mini-windows t)
26
27
28 (add-to-list 'auto-mode-alist '("emacs\\'" . emacs-lisp-mode))
29 (fringe-mode 0)
30
31
32
33 ;;; Set symbol for the border
34 (set-display-table-slot standard-display-table
35                         'vertical-border 
36                         (make-glyph-code ?┃))
37
38 (set-face-attribute 'vertical-border nil  :foreground "gray")
39
40
41 (add-to-list 'load-path "~/.emacs.d/config")
42 (require 'my-packages)
43
44 ;; elscreen should be placed begin of https://github.com/knu/elscreen/issues/6
45 (elscreen-start)
46 (require 'init-elscreen)
47 (require 'init-color-theme)
48
49
50 ;---------------------------------------------------------------------------------------
51 ;; Ido
52 ;;
53 (require 'ido-vertical-mode)
54 (ido-vertical-mode 1)
55 (require 'flx-ido)
56 (ido-mode 1)
57 (ido-everywhere 1)
58 (flx-ido-mode 1)
59 (setq ido-use-faces nil)
60
61 (setq org-completion-use-ido t)
62 (setq magit-completing-read-function 'magit-ido-completing-read)
63
64 (require 'ido-ubiquitous)
65 (ido-ubiquitous-mode 1)
66
67 ;; smex
68 (require 'smex) 
69 (global-set-key (kbd "M-x") 'smex)
70 (global-set-key (kbd "M-X") 'smex-major-mode-commands)
71
72 ;;---------------------------------------------------------------------------------------
73 ;; Magit
74 ;;
75 (require 'magit)
76 (setq magit-last-seen-setup-instructions "1.4.0")
77 (global-set-key (kbd "C-x g") 'magit-status)
78 ;(setq magit-auto-revert-mode nil)
79
80
81 ;(require 'init-evil)
82
83
84
85 ;;---------------------------------------------------------------------------------------
86 ;; Fiplr
87 ;;
88 (setq fiplr-root-markers '(".git" ".svn" "*.DS_Store"))
89 (setq fiplr-ignored-globs '((directories (".git" ".svn"))
90                             (files ("*.jpg" "*.png" "*.zip" "*~" "*.o" ".obj" "*.swp" "*.hg" ".pyc" ".*" ))))
91
92 (global-set-key (kbd "C-x f") 'fiplr-find-file)
93
94 ;;---------------------------------------------------------------------------------------
95 ;; Wind-move
96 ;;
97 (global-set-key (kbd "C-x C-l") 'windmove-right)
98 (global-set-key (kbd "C-x C-h") 'windmove-left)
99 (global-set-key (kbd "C-x C-k") 'windmove-up)
100 (global-set-key (kbd "C-x C-j") 'windmove-down)
101
102 ;;---------------------------------------------------------------------------------------
103 ;; sr-speedbar
104 ;;
105 ;(require 'sr-speedbar)
106 ;(setq speedbar-use-images nil)
107 ;(setq speedbar-show-unknown-files t)
108
109
110 ;(toggle-frame-fullscreen)
111
112
113 (require 'projectile)
114 (projectile-global-mode)
115 (setq projectile-enable-caching t)
116 (require 'projectile-speedbar)
117
118 ;(require 'cc-mode)
119 ;(require 'ecb)
120
121 ;(setq ecb-layout-name "leftright3")
122
123
124 ;(setq mac-command-modifier 'super) ; make cmd key do Meta
125 (global-set-key (kbd "<s-return>") 'toggle-frame-fullscreen)
126
127
128
129
130 (global-set-key (kbd "M-g M-v") 'split-window-right)
131 (global-set-key (kbd "M-g M-s") 'split-window-below)
132 (global-set-key (kbd "M-g M-o") 'delete-other-windows)
133
134 (global-set-key (kbd "M-g M-w") 'other-window)
135
136 ;; gnu global support
137 ;(require 'semantic/db)
138 ;(global-semanticdb-minor-mode 1)
139
140 (require 'init-ggtags)
141
142 (global-unset-key "\C-o")
143 (global-set-key (kbd "C-o C-f") 'ido-find-file)
144 (global-set-key (kbd "C-o C-b") 'ido-switch-buffer)
145
146 (global-set-key (kbd "C-o g") 'ggtags-find-file)
147 (global-set-key (kbd "C-o t") 'ggtags-find-tag-dwim)
148
149 (global-set-key (kbd "M-g M-g") 'magit-status)
150
151
152 (setq scroll-margin 5)
153 (setq scroll-conservatively 10000)
154 (show-paren-mode t)
155
156
157 (require 'init-c-cpp)
158