author | Luke Hoersten <Luke@Hoersten.org> |
Fri, 09 Jan 2009 12:35:09 -0600 | |
changeset 2 | 0c29010a8c83 |
parent 1 | ede059431d20 |
child 3 | 47d5df23c502 |
permissions | -rw-r--r-- |
0 | 1 |
;; ~/.emacs - Luke Hoersten - v4.0 |
2 |
||
3 |
;; general |
|
4 |
(setq-default load-path (cons "~/.emacs.d" load-path)) ; set default emacs load path |
|
5 |
||
6 |
(setq-default ediff-split-window-function 'split-window-horizontally) ; diff horizontally |
|
7 |
(setq-default x-select-enable-clipboard t) ; paste from X buffer |
|
8 |
(setq-default inhibit-splash-screen t) ; disable splash screen |
|
2
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
9 |
;;(setq-default show-trailing-whitespace t) ; show trailing whitespace |
0 | 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 |
|
17 |
||
18 |
(ido-mode t) ; file/buffer selector |
|
19 |
(setq-default ido-enable-flex-matching t) ; fuzzy matching is a must have |
|
20 |
(add-hook 'text-mode-hook 'flyspell-mode t) ; spellcheck text |
|
21 |
||
22 |
;; coding |
|
23 |
(which-func-mode t) ; show current function |
|
24 |
(show-paren-mode t) ; show matching paren |
|
2
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
25 |
(transient-mark-mode t) ; show highlighting |
0 | 26 |
(global-font-lock-mode t) ; syntax highlighting |
2
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
27 |
(global-whitespace-mode t) ; show whitespace |
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
28 |
(setq-default whitespace-style '(tab-mark trailing tabs empty)) ; what whitespace elements to show |
0 | 29 |
(add-hook 'before-save-hook 'whitespace-cleanup) ; cleanup whitespace on exit |
30 |
(load "hoersten-pastebin-region") ; send selected text to pastebin |
|
31 |
(load "mercurial") ; load mercurial mode |
|
32 |
(load "ahg") ; load suplimental mercurial mode |
|
33 |
(load "hoersten-c-style") ; load c specific lisp |
|
34 |
(global-set-key (kbd "C-c c") 'compile) |
|
35 |
||
36 |
;; gdb settings |
|
37 |
(setq-default gdb-many-windows t) ; gdb many windows |
|
38 |
(setq-default gdb-use-separate-io-buffer t) ; gdb stdio output |
|
39 |
(setq-default gud-tooltip-mode t) ; mouse hover variables |
|
40 |
(global-set-key (kbd "C-c g") 'gdb) ; gdb |
|
41 |
||
42 |
;; haskell |
|
43 |
(setq haskell-font-lock-symbols 'unicode) |
|
44 |
||
45 |
;; use only spaces for alignment |
|
2
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
46 |
(global-set-key (kbd "C-c a") 'align-with-spaces) ; align |
1 | 47 |
(defun align-with-spaces (beg end pattern) |
0 | 48 |
"Align selected using only spaces for whitespace." |
1 | 49 |
(interactive "r\nsAlign by: ") |
0 | 50 |
(let ((indent-tabs-mode nil)) |
1 | 51 |
(align-string beg end pattern 1) |
52 |
(align-entire beg end) |
|
53 |
(untabify beg end) |
|
54 |
(indent-region beg end) |
|
55 |
(whitespace-cleanup-region beg end))) |
|
0 | 56 |
|
1 | 57 |
;; Shell |
0 | 58 |
(global-set-key (kbd "C-c s") 'shell) ; start shell |
59 |
(ansi-color-for-comint-mode-on) ; color in shell buffer |
|
60 |
(setq-default comint-scroll-to-bottom-on-input t) ; only type on prompt |
|
61 |
(setq-default comint-scroll-show-maximum-output t) ; place text at bottom |
|
62 |
||
63 |
;; map file extensions to modes |
|
64 |
(setq-default auto-mode-alist |
|
2
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
65 |
(append |
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
66 |
'(("\\.ipp$" . c++-mode) |
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
67 |
("\\.inl$" . c++-mode) |
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
68 |
("SCons" . python-mode) |
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
69 |
("\\.jj$" . java-mode)) |
0c29010a8c83
Added whitespace highlighting.
Luke Hoersten <Luke@Hoersten.org>
parents:
1
diff
changeset
|
70 |
auto-mode-alist)) |
0 | 71 |
|
72 |
;; x stuff |
|
73 |
(if (not window-system) |
|
1 | 74 |
(menu-bar-mode nil) ; remove menu bar in no-x mode |
75 |
(tool-bar-mode nil) ; remove tool bar |
|
76 |
(scroll-bar-mode nil) ; remove scroll bar |
|
0 | 77 |
(custom-set-faces '(default ((t (:background "#000000" :foreground "#ffffff" :height 100 :family "DejaVu Sans Mono"))))) |
78 |
(setq default-frame-alist '((width . 100) (height . 50) (menu-bar-lines . 1))) |
|
79 |
||
80 |
;; twilight theme |
|
81 |
(require 'color-theme) |
|
82 |
(load "color-theme-twilight") |
|
83 |
(color-theme-twilight) |
|
84 |
(global-hl-line-mode t)) |