/
.emacs
97 lines (73 loc) · 3.13 KB
/
.emacs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
(show-paren-mode 1)
;; Highlight the parenthesis at point and its match.
;; http://www.emacswiki.org/emacs/ShowParenMode
(set-face-background 'show-paren-match-face "#C0FFFF")
(set-face-background 'show-paren-mismatch-face "#FF4040")
(set-face-foreground 'show-paren-mismatch-face "#FFFFFF")
(set-face-attribute 'show-paren-mismatch-face nil
:weight 'bold)
;; change colors/fonts
;;http://emacs-fu.blogspot.com/2009/01/balancing-your-parentheses.html
(setq show-paren-style 'expression)
;; Highlight the entire expression
;; http://www.emacsblog.org/2007/08/07/quick-tip-show-paren-mode/
(tool-bar-mode -1)
;; remove toolbar
;; http://www.emacswiki.org/emacs/ToolBar
(menu-bar-mode -1)
;; who needs 'em?
;; http://www.emacswiki.org/emacs/ToolBar
(set-scroll-bar-mode 'right)
;; http://www.emacswiki.org/emacs/ScrollBar
(mouse-avoidance-mode 'exile)
;; move the mouse pointer to the corner of the screen when approached
;; http://www.emacswiki.org/emacs/MouseAvoidance
(require 'ido)
(ido-mode t)
;; turn ido-mode on
;; http://www.emacswiki.org/emacs/InteractivelyDoThings
(add-to-list 'auto-mode-alist '("\\.arc\\'" . lisp-mode))
;; make .arc files open in lisp-mode
;; http://www.emacswiki.org/emacs/AutoModeAlist
(when (string-match "linux" system-configuration)
(setq x-select-enable-clipboard t))
;; make copy-and-paste work properly under X Windows
;; http://www.emacswiki.org/cgi-bin/wiki/CopyAndPaste
(column-number-mode t)
;; show the column number in the mode line
(size-indication-mode t)
;; show the buffer size in the mode line
;; http://www.emacswiki.org/emacs/ModeLineConfiguration
(setq frame-title-format '("%b - " invocation-name "@" system-name))
;; change the title of emacs
;; http://www.gnu.org/software/emacs/elisp/html_node/Frame-Titles.html
(add-hook 'before-save-hook 'delete-trailing-whitespace)
;; http://www.emacswiki.org/emacs/DeletingWhitespace
(setq truncate-partial-width-windows nil)
;; don't truncate lines of text when multiple windows; wrap them instead
;; http://www.emacswiki.org/emacs/TruncateLines
;; about binding keys: http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-Rebinding.html#Init-Rebinding
(global-set-key (kbd "C-;") 'comment-or-uncomment-region)
;; http://www.emacswiki.org/emacs/CommentingCode
(global-set-key (kbd "C-.") 'other-window)
(global-set-key (kbd "C-,") 'prev-window)
(defun prev-window ()
(interactive)
(other-window -1))
(setq confirm-kill-emacs 'y-or-n-p)
;; yell at me before going away
;; http://www.gnu.org/software/emacs/manual/html_node/emacs/Exiting.html
;; (setq inferior-lisp-program "/usr/bin/clisp")
;; (add-to-list 'load-path "~/.emacs.d/slime/")
;; (require 'slime)
;; (slime-setup)
;; Can this be contingent on actually having clisp and slime?
;; possibly by autoload instead of require?
(setq inhibit-startup-message t)
(setq default-indicate-empty-lines t)
;; http://www.emacswiki.org/emacs/TheFringe
;; (setq tab-width 2)
;; (setq c-basic-offset 4)
(setq indent-tabs-mode nil)
;; Use spaces instead of tabs to indent
;; http://www.jwz.org/doc/tabs-vs-spaces.html