Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 192 lines (153 sloc) 6.515 kb
bd75efe @To1ne Getting started with el-get
authored
1 ; init.el --- Start the generators
2
6d132be @To1ne cleanup the list of packages
authored
3 ;; basic settings
88650f0 @To1ne use seperate file to load el-get configuration
authored
4 (defvar temacco-root-dir (file-name-directory (or (buffer-file-name) load-file-name))
5 "Root directory of the temacco configuration (probably ~/.emacs.d/)")
a7de3fe @To1ne attempt to restructure the directory
authored
6 (defvar temacco-core-dir (expand-file-name "core/" temacco-root-dir)
7 "Directory containing core files of the temacco configuration")
8 (add-to-list 'load-path temacco-root-dir) ;; TODO remove?
9 (add-to-list 'load-path temacco-core-dir)
91873c6 @To1ne dirty all-in-one commit
authored
10
bd75efe @To1ne Getting started with el-get
authored
11 ;; load el-get
88650f0 @To1ne use seperate file to load el-get configuration
authored
12 (require 'temacco-el-get)
b474741 @To1ne various changes:
authored
13 ;; load Mac OS X configuration
14 (require 'temacco-mac-osx)
15 ;; load user & system configuration
16 (require 'temacco-user-system-config)
91873c6 @To1ne dirty all-in-one commit
authored
17
6d132be @To1ne cleanup the list of packages
authored
18 ;; TODO CLEANUP BELOW
20e02e5 @To1ne took settings from my old configuration
authored
19 ;; enable ido mode
20 (require 'ido)
6e5d53c @To1ne cleanup of unused stuff + correct use of modes
authored
21 (ido-mode 1)
20e02e5 @To1ne took settings from my old configuration
authored
22 (setq ido-enable-flex-matching t) ; enable fuzzy matching
23
24 ;; keep list recent files
25 (require 'recentf)
26 (recentf-mode 1)
27 ; and use ido to find a recent file
28 (defun recentf-ido-find-file ()
29 "Find a recent file using Ido."
30 (interactive)
31 (let ((file (ido-completing-read "Choose recent file: " recentf-list nil t)))
32 (when file
33 (find-file file))))
34 (global-set-key (kbd "C-x f") 'recentf-ido-find-file)
35
36 ;; set indentation correct
dd2df59 @To1ne pre cleanup commit
authored
37 (setq-default indent-tabs-mode nil ; do not indent with tabs
75a14de @To1ne default, do not indent with 3 spaces
authored
38 ; standard-indent 3 ; indent with 3 spaces
ab9bfe5 @To1ne using emacs 24 again
authored
39 ; tab-width standard-indent ; show TAB as standard indent
dd2df59 @To1ne pre cleanup commit
authored
40 )
41 (defun temacco-set-tab-stop-list ()
42 "Set the tab stop list to a multiples of the standart-indent size"
43 (interactive)
44 (setq tab-stop-list
45 (let ((stops (cons standard-indent nil)))
46 (while (< (car stops) 250)
47 (setq stops (cons (+ standard-indent (car stops)) stops)))
48 (nreverse stops))))
49 (temacco-set-tab-stop-list)
ab9bfe5 @To1ne using emacs 24 again
authored
50
51 ;;; cperl-mode is preferred to perl-mode
91873c6 @To1ne dirty all-in-one commit
authored
52 (defalias 'perl-mode 'cperl-mode)
20e02e5 @To1ne took settings from my old configuration
authored
53
54 ;; show visible bell instead of sound
55 (setq visible-bell t)
56
57 ;; enable one character answering to Yes/No questions.
58 (fset 'yes-or-no-p 'y-or-n-p)
59
60 ;; avoid closing emacs by accident.
61 (setq confirm-kill-emacs 'y-or-n-p)
62
63 ;; interact with the X clipboard.
41f1a4f @To1ne cleanup and indentation modifications
authored
64 (setq mouse-drag-copy-region nil ; stops selection with a mouse being immediately injected to the kill ring
65 x-select-enable-primary nil ; stops killing/yanking interacting with primary X11 selection
96b0a69 @To1ne small changes
authored
66 x-select-enable-clipboard t ; makes killing/yanking interact with clipboard X11 selection
41f1a4f @To1ne cleanup and indentation modifications
authored
67 )
20e02e5 @To1ne took settings from my old configuration
authored
68
69 ;; toggle full screen function
91873c6 @To1ne dirty all-in-one commit
authored
70 (defun toggle-fullscreen ()
20e02e5 @To1ne took settings from my old configuration
authored
71 (interactive)
72 (if (fboundp 'ns-toggle-fullscreen)
73 (ns-toggle-fullscreen)
74 (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
91873c6 @To1ne dirty all-in-one commit
authored
75 '(2 "_NET_WM_STATE_FULLSCREEN" 0))))
76 (defalias 'fullscreen 'toggle-fullscreen)
77
78 ;; truncate lines by default
ab9bfe5 @To1ne using emacs 24 again
authored
79 (set-default 'truncate-lines t)
91873c6 @To1ne dirty all-in-one commit
authored
80 ;; move according logical lines (which is actually useless when using 'truncate-lines)
81 (setq line-move-visual nil)
20e02e5 @To1ne took settings from my old configuration
authored
82
83 ;; backup 5 versions of a file and store them in one place.
41f1a4f @To1ne cleanup and indentation modifications
authored
84 (setq make-backup-files t
85 version-control t
86 backup-directory-alist (quote ((".*" . "~/.emacs_backups/")))
87 delete-old-versions t)
20e02e5 @To1ne took settings from my old configuration
authored
88
b474741 @To1ne various changes:
authored
89 ; TODO not console friendly (X only, see http://blog.chmouel.com/2009/08/11/emacs-daemon-and-xdefaults/ )
91873c6 @To1ne dirty all-in-one commit
authored
90 ;(set-face-font 'default "-unknown-DejaVu Sans Mono-normal-normal-normal-*-17-*-*-*-m-0-iso10646-1")
91 ;(set-face-font 'default "-unknown-DejaVu Sans Mono-normal-normal-normal-*-14-*-*-*-m-0-iso10646-1")
b474741 @To1ne various changes:
authored
92 ; (defun temacco-try-set-face-font (font)
93 ; "Try to set the given font, if installed"
94 ; (if (null (x-list-fonts font)) ; TODO use unless or when
95 ; nil (set-face-font 'default font)))
96 ; (temacco-try-set-face-font "-unknown-Ubuntu Mono-normal-normal-normal-*-17-*-*-*-m-0-iso10646-1")
91873c6 @To1ne dirty all-in-one commit
authored
97
a683f09 @To1ne init cleanup done, ready to split in files
authored
98 ;; highlight current line
20e02e5 @To1ne took settings from my old configuration
authored
99 (global-hl-line-mode 1)
91873c6 @To1ne dirty all-in-one commit
authored
100
101 ;; make ediff more usable.
102 (setq ediff-window-setup-function 'ediff-setup-windows-plain
6e5d53c @To1ne cleanup of unused stuff + correct use of modes
authored
103 ; ediff-split-window-function 'split-window-vertically
104 )
91873c6 @To1ne dirty all-in-one commit
authored
105
106 ;; configure eshell
107 (setq eshell-directory-name "~/.emacs.d/eshell")
108
109 ;; visualize blanks TODO set faces
110 (require 'whitespace)
111 ;(global-whitespace-mode)
dd2df59 @To1ne pre cleanup commit
authored
112 (setq whitespace-line-column 100)
91873c6 @To1ne dirty all-in-one commit
authored
113
114 ;; give buffers a sensible unique name
115 (require 'uniquify)
116 (setq uniquify-buffer-name-style 'post-forward
117 uniquify-separator "|")
20e02e5 @To1ne took settings from my old configuration
authored
118
119 ;; no menu/tool/scroll bar
6e5d53c @To1ne cleanup of unused stuff + correct use of modes
authored
120 (menu-bar-mode -1)
121 (tool-bar-mode -1)
122 (scroll-bar-mode -1)
20e02e5 @To1ne took settings from my old configuration
authored
123
91873c6 @To1ne dirty all-in-one commit
authored
124 ;; TODO
a683f09 @To1ne init cleanup done, ready to split in files
authored
125 ;(global-linum-mode 1) ; display line numbers in the left margin
6e5d53c @To1ne cleanup of unused stuff + correct use of modes
authored
126 (show-paren-mode 1) ; highlight the matching parentheses
20e02e5 @To1ne took settings from my old configuration
authored
127
91873c6 @To1ne dirty all-in-one commit
authored
128 ;; display time in the mode line
41f1a4f @To1ne cleanup and indentation modifications
authored
129 (setq display-time-day-and-date nil ; hide date
130 display-time-24hr-format t ; display time in 24h
879cf2c @To1ne clean solution on hiding the load in the mode line
authored
131 display-time-default-load-average nil) ; hide the load
e9ed3e8 @To1ne do not display time in mode line
authored
132 ;(display-time)
20e02e5 @To1ne took settings from my old configuration
authored
133
91873c6 @To1ne dirty all-in-one commit
authored
134 ;; display the column number in the mode line.
a683f09 @To1ne init cleanup done, ready to split in files
authored
135 (setq column-number-mode t)
91873c6 @To1ne dirty all-in-one commit
authored
136
137 ;; TODO flyspell-prog-mode hook to c/ruby/perl and flyspell to other?
138 ;; TODO auto-fill mode (in comments)
139
dd2df59 @To1ne pre cleanup commit
authored
140 (setq-default frame-background-mode 'light)
141
142 ;; Remember the last cursor position in emacs
143 (require 'saveplace)
144 ;(setq save-place-file "~/.emacs.d/saveplace")
145 (setq-default save-place t)
146
147 ; ibuffer instead of list-buffers
148 (global-set-key (kbd "C-x C-b") 'ibuffer)
149
150 ;; Use regex searches by default
96b0a69 @To1ne small changes
authored
151 ;(global-set-key (kbd "C-s") 'isearch-forward-regexp)
152 ;(global-set-key (kbd "C-r") 'isearch-backward-regexp)
153 ;(global-set-key (kbd "C-M-s") 'isearch-forward)
154 ;(global-set-key (kbd "C-M-r") 'isearch-backward)
dd2df59 @To1ne pre cleanup commit
authored
155
41f1a4f @To1ne cleanup and indentation modifications
authored
156 ;(setq redisplay-dont-pause t)
dd2df59 @To1ne pre cleanup commit
authored
157
b474741 @To1ne various changes:
authored
158 ;; shorten the time to echo the unfinished commands
159 (setq echo-keystrokes 0.1)
dd2df59 @To1ne pre cleanup commit
authored
160
eaa9ada @To1ne show 'unused' lines in left fringe (indicate-empty-lines)
authored
161 (setq-default indicate-empty-lines t)
162
285160f @To1ne added (electric-pair-mode 1)
authored
163 ; Toggle automatic parens pairing
fca8993 @To1ne disable electric pair mode (buggy)
authored
164 ;(electric-pair-mode 1)
285160f @To1ne added (electric-pair-mode 1)
authored
165
a8aa3cd @To1ne by default show many gdb windows
authored
166 (setq gdb-many-windows t)
167
7099a5a @To1ne add clang to ac sources
authored
168 ; Disable Flymake GUI warnings
169 (setq flymake-gui-warnings-enabled nil)
170
171 ;(setq font-lock-maximum-decoration '((c-mode . t) (c++-mode . 1) (t . 1)))
172
fca8993 @To1ne disable electric pair mode (buggy)
authored
173 ;; screensaver
174 ;(zone-when-idle 120)
175
91873c6 @To1ne dirty all-in-one commit
authored
176 ;; start the client server
20e02e5 @To1ne took settings from my old configuration
authored
177 (server-start)
dd2df59 @To1ne pre cleanup commit
authored
178
179 ;; END
b474741 @To1ne various changes:
authored
180 (custom-set-variables
181 ;; custom-set-variables was added by Custom.
182 ;; If you edit it by hand, you could mess it up, so be careful.
183 ;; Your init file should contain only one such instance.
184 ;; If there is more than one, they won't work right.
d541dc0 @To1ne more safe themes
authored
185 '(custom-safe-themes (quote ("6938c51c0a89f078c61b979af23ae4c32204458f16a6a08c1a683ab478a7bc6b" "d589f8adcca47e586469f7719e11a1d3ead95d13bf365ac0ae15b04fa6ca7c93" default))))
b474741 @To1ne various changes:
authored
186 (custom-set-faces
187 ;; custom-set-faces was added by Custom.
188 ;; If you edit it by hand, you could mess it up, so be careful.
189 ;; Your init file should contain only one such instance.
190 ;; If there is more than one, they won't work right.
fca8993 @To1ne disable electric pair mode (buggy)
authored
191 )
Something went wrong with that request. Please try again.