author | Luke Hoersten <Luke@Hoersten.org> |
Mon, 16 Mar 2009 16:10:37 -0500 | |
changeset 7 | de2d02049ed6 |
parent 6 | 5f0680e88468 |
child 8 | f16b95667aa6 |
permissions | -rw-r--r-- |
4
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
1 |
;; ~/.emacs |
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
2 |
;; Luke Hoersten <[email protected]> |
0 | 3 |
|
4 |
;; general |
|
4
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
5 |
(setq-default load-path (cons "~/.emacs.d/" load-path)) ; set default emacs load path |
0 | 6 |
|
7 |
(setq-default ediff-split-window-function 'split-window-horizontally) ; diff horizontally |
|
8 |
(setq-default x-select-enable-clipboard t) ; paste from X buffer |
|
9 |
(setq-default inhibit-splash-screen t) ; disable splash screen |
|
10 |
(put 'set-goal-column 'disabled nil) ; enable goal column setting |
|
11 |
(put 'narrow-to-region 'disabled nil) ; enable hiding |
|
12 |
||
13 |
(display-time-mode t) ; show clock |
|
14 |
(column-number-mode t) ; show column numbers |
|
15 |
(delete-selection-mode t) ; replace highlighted text |
|
16 |
(windmove-default-keybindings) ; move between windows with shift-arrow |
|
5
59b1838be594
Added electric braces and minor tweaks.
Luke Hoersten <Luke@Hoersten.org>
parents:
4
diff
changeset
|
17 |
(setq-default indent-tabs-mode nil) ; mouse hover variables |
0 | 18 |
|
19 |
(ido-mode t) ; file/buffer selector |
|
20 |
(setq-default ido-enable-flex-matching t) ; fuzzy matching is a must have |
|
21 |
(add-hook 'text-mode-hook 'flyspell-mode t) ; spellcheck text |
|
22 |
||
23 |
;; coding |
|
24 |
(which-func-mode t) ; show current function |
|
25 |
(show-paren-mode t) ; show matching paren |
|
2
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
26 |
(transient-mark-mode t) ; show highlighting |
0 | 27 |
(global-font-lock-mode t) ; syntax highlighting |
2
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
28 |
(global-whitespace-mode t) ; show whitespace |
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
29 |
(setq-default whitespace-style '(tab-mark trailing tabs empty)) ; what whitespace elements to show |
0 | 30 |
(add-hook 'before-save-hook 'whitespace-cleanup) ; cleanup whitespace on exit |
4
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
31 |
(global-set-key (kbd "C-c c") 'compile) ; compile |
6
5f0680e88468
Added recompile key and removed doxymacs dep because of bug in Ubuntu package.
Luke Hoersten <Luke@Hoersten.org>
parents:
5
diff
changeset
|
32 |
(global-set-key (kbd "C-c r") 'recompile) ; recompile |
4
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
33 |
|
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
34 |
(require 'hoersten-pastebin-region) ; send selected text to pastebin |
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
35 |
(require 'mercurial) ; load mercurial mode |
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
36 |
(require 'hoersten-c-style) ; load c specific lisp |
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
37 |
|
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
38 |
(require 'pretty-mode) ; convert characters to unicode |
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
39 |
(global-pretty-mode t) |
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
40 |
(setq haskell-font-lock-symbols 'unicode) |
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
41 |
|
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
42 |
(require 'yasnippet) |
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
43 |
(yas/initialize) |
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
44 |
(yas/load-directory "~/.emacs.d/snippets/") |
0 | 45 |
|
46 |
;; gdb settings |
|
47 |
(setq-default gdb-many-windows t) ; gdb many windows |
|
48 |
(setq-default gdb-use-separate-io-buffer t) ; gdb stdio output |
|
49 |
(setq-default gud-tooltip-mode t) ; mouse hover variables |
|
50 |
(global-set-key (kbd "C-c g") 'gdb) ; gdb |
|
51 |
||
52 |
;; use only spaces for alignment |
|
2
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
53 |
(global-set-key (kbd "C-c a") 'align-with-spaces) ; align |
1 | 54 |
(defun align-with-spaces (beg end pattern) |
0 | 55 |
"Align selected using only spaces for whitespace." |
1 | 56 |
(interactive "r\nsAlign by: ") |
0 | 57 |
(let ((indent-tabs-mode nil)) |
1 | 58 |
(align-string beg end pattern 1) |
59 |
(align-entire beg end) |
|
60 |
(untabify beg end) |
|
61 |
(indent-region beg end) |
|
62 |
(whitespace-cleanup-region beg end))) |
|
0 | 63 |
|
1 | 64 |
;; Shell |
0 | 65 |
(global-set-key (kbd "C-c s") 'shell) ; start shell |
66 |
(ansi-color-for-comint-mode-on) ; color in shell buffer |
|
67 |
(setq-default comint-scroll-to-bottom-on-input t) ; only type on prompt |
|
68 |
(setq-default comint-scroll-show-maximum-output t) ; place text at bottom |
|
69 |
||
70 |
;; map file extensions to modes |
|
71 |
(setq-default auto-mode-alist |
|
2
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
72 |
(append |
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
73 |
'(("\\.ipp$" . c++-mode) |
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
74 |
("\\.inl$" . c++-mode) |
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
75 |
("SCons" . python-mode) |
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
76 |
("\\.jj$" . java-mode)) |
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
77 |
auto-mode-alist)) |
0 | 78 |
|
79 |
;; x stuff |
|
80 |
(if (not window-system) |
|
1 | 81 |
(menu-bar-mode nil) ; remove menu bar in no-x mode |
82 |
(tool-bar-mode nil) ; remove tool bar |
|
83 |
(scroll-bar-mode nil) ; remove scroll bar |
|
4
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
84 |
(custom-set-faces '(default ((t (:background "#000000" :foreground "#ffffff" :height 101 :family "DejaVu Sans Mono"))))) |
0 | 85 |
(setq default-frame-alist '((width . 100) (height . 50) (menu-bar-lines . 1))) |
5
59b1838be594
Added electric braces and minor tweaks.
Luke Hoersten <Luke@Hoersten.org>
parents:
4
diff
changeset
|
86 |
(visual-line-mode t) ; word wrap break on whitespace |
0 | 87 |
|
88 |
;; twilight theme |
|
89 |
(require 'color-theme) |
|
90 |
(load "color-theme-twilight") |
|
91 |
(color-theme-twilight) |
|
92 |
(global-hl-line-mode t)) |