summary refs log tree commit diff
path: root/emacs.d/init.el
blob: c57cb9a0ac812c8858ec445cd035b1bd1f562044 (plain) (blame)
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
;; no menu
(menu-bar-mode -1)

;; show parenthesis
(show-paren-mode +1)

;; and lose the stupid pipe chars on the split-screen bar
(set-face-foreground 'vertical-border "white")
(set-face-background 'vertical-border "white")

;; alias yes-or-no to y-or-n
(fset 'yes-or-no-p 'y-or-n-p)

;; set utf-8 as the default encoding
(prefer-coding-system 'utf-8-unix)

(autoload 'ibuffer "ibuffer" "List buffers." t)

(require 'whitespace)
(global-whitespace-mode 1)

;;; set some variables
;; add a new line at the end of the file
(setq
 auto-save-default nil
 auto-save-list-file-prefix nil
 frame-title-format '(buffer-file-name "%f" ("%b"))
 inhibit-startup-message t
 make-backup-files nil
 require-final-newline t
 tab-always-indent 'complete
 vc-follow-symlinks t
 whitespace-style '(face trailing tabs tab-mark))

;; twitter's default
(setq-default
 c-basic-offset 2
 indent-tabs-mode nil
 python-indent-offset 2
 scala-indent:use-javadoc-style t
 sh-basic-offset 2
 sh-indentation 2)

;;; some bindings
(global-set-key (kbd "M-j") 'join-line)
(global-set-key (kbd "C-x C-b") 'ibuffer)

;;; if our version is >= 24 and we have the packages.el file, load it.
(when (>= emacs-major-version 24)
  (if (file-exists-p "~/.emacs.d/packages.el")
      (load "~/.emacs.d/packages.el")))