init.el
author Luke Hoersten <Luke@Hoersten.org>
Thu, 27 Jun 2013 11:52:53 -0500
changeset 59 f346d7591eac
parent 58 c25a7ccd237a
child 60 8beb028f936c
permissions -rw-r--r--
Removed more unused init code.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
     1
;; ~/.emacs.d/init.el (~/.emacs)
4
0fda818a8b6a Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 3
diff changeset
     2
;; Luke Hoersten <[email protected]>
0
c25fee3c92e9 Initial commit.
Luke Hoersten <Luke@Hoersten.org>
parents:
diff changeset
     3
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
     4
;;;; General ;;;;
44
6e66ab8d9185 Split out some init files.
Luke Hoersten <Luke@Hoersten.org>
parents: 43
diff changeset
     5
(add-to-list 'load-path "~/.emacs.d")     ; set default emacs load path
0
c25fee3c92e9 Initial commit.
Luke Hoersten <Luke@Hoersten.org>
parents:
diff changeset
     6
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
     7
(setq-default
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
     8
 ediff-split-window-function
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
     9
 'split-window-horizontally              ; diff horizontally
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    10
 inhibit-splash-screen t                  ; disable splash screen
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    11
 truncate-lines t                         ; truncate, not wrap, lines
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    12
 indent-tabs-mode nil                     ; only uses spaces for indentation
35
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
    13
 split-width-threshold 181                ; min width to split window horizontially
40
886afd628fa2 Split off programming language-specific custimizations to separate init files.
Luke Hoersten <Luke@Hoersten.org>
parents: 39
diff changeset
    14
 split-height-threshold 120               ; min width to split window vertically
43
cfdd7b253085 Added newline support and 4-width tabs in python.
Luke Hoersten <Luke@Hoersten.org>
parents: 42
diff changeset
    15
 reb-re-syntax 'string                    ; use string syntax for regexp builder
cfdd7b253085 Added newline support and 4-width tabs in python.
Luke Hoersten <Luke@Hoersten.org>
parents: 42
diff changeset
    16
 require-final-newline 'visit-save)       ; add a newline automatically
0
c25fee3c92e9 Initial commit.
Luke Hoersten <Luke@Hoersten.org>
parents:
diff changeset
    17
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    18
(put 'set-goal-column 'disabled nil)      ; enable goal column setting
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    19
(put 'narrow-to-region 'disabled nil)     ; enable hiding
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    20
(put 'narrow-to-page 'disabled nil)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    21
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    22
(column-number-mode t)                    ; show column numbers
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    23
(delete-selection-mode t)                 ; replace highlighted text
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    24
(windmove-default-keybindings)            ; move between windows with shift-arrow
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    25
(fset 'yes-or-no-p 'y-or-n-p)             ; replace yes/no prompts
44
6e66ab8d9185 Split out some init files.
Luke Hoersten <Luke@Hoersten.org>
parents: 43
diff changeset
    26
(global-hl-line-mode t)                   ; highlight current line
6e66ab8d9185 Split out some init files.
Luke Hoersten <Luke@Hoersten.org>
parents: 43
diff changeset
    27
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    28
45
12715da9a300 Changes to reflect Ubuntu 11.10 upgrade.
Luke Hoersten <Luke@Hoersten.org>
parents: 44
diff changeset
    29
;;; Coding
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    30
(which-func-mode t)                       ; show current function
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    31
(show-paren-mode t)                       ; show matching paren
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    32
(transient-mark-mode t)                   ; show highlighting
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    33
(global-font-lock-mode t)                 ; syntax highlighting
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    34
(global-set-key (kbd "C-c c") 'compile)   ; compile
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    35
(global-set-key (kbd "C-c r") 'recompile) ; recompile
54
e1b82f67f96e Cleaned up unused modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 53
diff changeset
    36
(subword-mode t)                          ; move by camelCase words
45
12715da9a300 Changes to reflect Ubuntu 11.10 upgrade.
Luke Hoersten <Luke@Hoersten.org>
parents: 44
diff changeset
    37
0
c25fee3c92e9 Initial commit.
Luke Hoersten <Luke@Hoersten.org>
parents:
diff changeset
    38
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    39
;;; Darwin
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    40
(setq is-mac (equal system-type 'darwin))
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    41
(when is-mac
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    42
  (setq-default
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    43
   mac-command-modifier 'meta
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    44
   ns-pop-up-frames nil
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    45
   ispell-program-name "/usr/local/bin/aspell"))
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    46
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    47
;;; Xorg
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    48
(when window-system
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    49
  (tool-bar-mode -1)      ; remove tool bar
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    50
  (scroll-bar-mode -1)    ; remove scroll bar
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    51
  (menu-bar-mode -1)      ; remove menu bar
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    52
  (visual-line-mode t)    ; word wrap break on whitespace
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    53
  (set-frame-font (if is-mac "Ubuntu Mono-14" "Ubuntu Mono-10.5")))
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    54
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    55
;;;; Mode-Specific ;;;;
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    56
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    57
;;; text-mode
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    58
(add-hook 'fundamental-mode-hook '(flyspell-mode t))      ; spellcheck text
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
    59
(add-hook 'fundamental-mode-hook 'turn-on-auto-fill)    ; autofill text
28
8f4bd2f2cc06 Aquamacs comes with more features so I removed some mac stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 26
diff changeset
    60
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    61
;;; ido-mode
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    62
(ido-mode t)                                            ; file/buffer selector
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    63
(setq-default
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    64
 ido-enable-flex-matching t                             ; fuzzy matching for ido mode
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    65
 ido-create-new-buffer 'always                          ; create new buffer without prompt
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    66
 ido-everywhere t)                                      ; use ido where possible
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    67
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    68
;;; whitespace-mode
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    69
(global-whitespace-mode t)                              ; show whitespace
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    70
(add-hook 'before-save-hook 'whitespace-cleanup)        ; cleanup whitespace on exit
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    71
(setq-default
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    72
 whitespace-line-column 120                             ; column width
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    73
 whitespace-style                                       ; whitespace to highlight
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    74
 '(trailing lines-tail empty indentation
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    75
            space-before-tab space-after-tab))
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    76
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    77
;;; python-mode
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    78
(add-hook 'python-mode-hook '(setq tab-width 4))
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    79
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    80
;;; org-mode
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    81
(add-hook
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    82
 'org-mode-hook
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    83
 (lambda ()
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    84
   (local-set-key (kbd "M-p") 'org-move-item-up)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    85
   (local-set-key (kbd "M-S-p") 'org-move-subtree-up)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    86
   (local-set-key (kbd "M-n") 'org-move-item-down)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    87
   (local-set-key (kbd "M-S-n") 'org-move-subtree-down)))
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    88
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    89
;;; ibuffer
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    90
(global-set-key (kbd "C-x C-b") 'ibuffer) ; better buffer browser
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    91
(setq-default
33
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
    92
 ibuffer-show-empty-filter-groups nil
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    93
 ibuffer-saved-filter-groups
33
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
    94
 '(("default"
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
    95
    ("Emacs Lisp" (mode . emacs-lisp-mode))
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
    96
    ("Haskell" (mode . haskell-mode))
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
    97
    ("Python" (mode . python-mode))
48
f17ebf233431 More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents: 47
diff changeset
    98
    ("Jython" (mode . jython-mode))
52
b54c3f2e12f6 Added clojure mode to ibuffer.
Luke Hoersten <Luke@Hoersten.org>
parents: 50
diff changeset
    99
    ("Clojure" (mode . clojure-mode))
53
0b3217376059 Minor haskell updates.
Luke Hoersten <Luke@Hoersten.org>
parents: 52
diff changeset
   100
    ("Markup" (mode . sgml-mode))
0b3217376059 Minor haskell updates.
Luke Hoersten <Luke@Hoersten.org>
parents: 52
diff changeset
   101
    ("HTML" (mode . html-mode))
0b3217376059 Minor haskell updates.
Luke Hoersten <Luke@Hoersten.org>
parents: 52
diff changeset
   102
    ("CSS" (mode . css-mode))
33
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   103
    ("C++" (mode . c++-mode)))))
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   104
(add-hook
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   105
 'ibuffer-mode-hook
36
d915699fbc26 Removed extranious lambda quotes.
Luke Hoersten <Luke@Hoersten.org>
parents: 35
diff changeset
   106
 (lambda ()
d915699fbc26 Removed extranious lambda quotes.
Luke Hoersten <Luke@Hoersten.org>
parents: 35
diff changeset
   107
   (ido-mode t)
d915699fbc26 Removed extranious lambda quotes.
Luke Hoersten <Luke@Hoersten.org>
parents: 35
diff changeset
   108
   (ibuffer-switch-to-saved-filter-groups "default")))
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
   109
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
   110
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   111
;;;; Requires and Packages ;;;;
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   112
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   113
;;; packages
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   114
(package-initialize)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   115
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   116
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/") t)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   117
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   118
;; install packages
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   119
(let ((ensure-installed
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   120
       (lambda (name)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   121
         (unless (package-installed-p name) (package-install name))))
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   122
      (packages
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   123
       '(ac-js2 auto-complete expand-region
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   124
                flymake-haskell-multi ghc ghci-completion haskell-mode
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   125
                iy-go-to-char js2-mode multiple-cursors rainbow-delimiters
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   126
                rainbow-mode skewer-mode solarized-theme yasnippet
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   127
                zencoding-mode visual-regexp)))
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   128
  (mapc ensure-installed packages))
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   129
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   130
;;; requires
40
886afd628fa2 Split off programming language-specific custimizations to separate init files.
Luke Hoersten <Luke@Hoersten.org>
parents: 39
diff changeset
   131
(require 'c-init)             ; c specific elisp
37
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   132
(require 'align-with-spaces)  ; use only spaces for alignment
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   133
(require 'move-line)          ; move line up or down
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   134
(require 'uniquify)           ; unique buffer names with dirs
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   135
(require 'auto-complete-config)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   136
(require 'iy-go-to-char)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   137
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   138
;;; auto-config-mode
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   139
(ac-config-default)
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   140
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   141
;;; terminal
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   142
(global-set-key (kbd "C-c s") 'eshell) ; start shell
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   143
(exec-path-from-shell-initialize)
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   144
(eshell)
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   145
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   146
;;; uniquify
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   147
(setq
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   148
 uniquify-buffer-name-style 'post-forward
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   149
 uniquify-separator ":")
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   150
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   151
;;; color-theme
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   152
(setq-default
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   153
 custom-safe-themes
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   154
 '("8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4"
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   155
   "d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" default))
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   156
(load-theme 'solarized-light)
42
ade8c2cc1b04 Fixed some minor bugs.
Luke Hoersten <Luke@Hoersten.org>
parents: 40
diff changeset
   157
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   158
;;; yasnippets
54
e1b82f67f96e Cleaned up unused modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 53
diff changeset
   159
(setq-default yas-prompt-functions '(yas-ido-prompt yas-dropdown-prompt)) ; use ido for multiple snippets
56
7446c9ffe828 Moved snippets
Luke Hoersten <Luke@Hoersten.org>
parents: 55
diff changeset
   160
(setq-default yas-snippet-dirs '("~/.emacs.d/snippets"))
54
e1b82f67f96e Cleaned up unused modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 53
diff changeset
   161
(yas-global-mode t)
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   162
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   163
;;; js2-mode
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   164
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   165
(add-hook 'js2-mode-hook '(ac-js2-mode t))
57
e35be98bd58c Tons more cleanups after emacs24 update.
Luke Hoersten <Luke@Hoersten.org>
parents: 56
diff changeset
   166
(setq-default ac-js2-evaluate-calls t)
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   167
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   168
;;; html-mode
53
0b3217376059 Minor haskell updates.
Luke Hoersten <Luke@Hoersten.org>
parents: 52
diff changeset
   169
(add-to-list 'auto-mode-alist '("\\.tpl\\'" . html-mode))
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   170
(add-hook
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   171
 'html-mode-hook
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   172
 (lambda ()
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   173
   (local-set-key (kbd "C-c t") 'mc/mark-sgml-tag-pair)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   174
   (zencoding-mode)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   175
   (rainbow-mode)))
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   176
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   177
;;; css-mode
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   178
(add-hook 'css-mode-hook '(rainbow-mode t))
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   179
37
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   180
;;; coding-modes map
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   181
(mapc
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   182
 (lambda (x)
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   183
   (add-hook
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   184
    x
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   185
    (lambda ()
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   186
      (linum-mode t)
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   187
      (rainbow-delimiters-mode t)
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   188
      (auto-complete-mode t)) t))
37
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   189
 '(text-mode-hook
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   190
   c-mode-common-hook
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   191
   python-mode-hook
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   192
   haskell-mode-hook
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   193
   js2-mode-hook
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   194
   html-mode-hook
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   195
   css-mode-hook
50
6590d340a568 Added clojure mode.
Luke Hoersten <Luke@Hoersten.org>
parents: 48
diff changeset
   196
   clojure-mode-hook
37
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   197
   emacs-lisp-mode-hook))
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   198
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   199
;;; haskell-mode
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   200
(add-hook
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   201
 'haskell-mode-hook
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   202
 (lambda ()
57
e35be98bd58c Tons more cleanups after emacs24 update.
Luke Hoersten <Luke@Hoersten.org>
parents: 56
diff changeset
   203
   (local-set-key (kbd "C-c i") 'haskell-navigate-imports) ; go to imports. prefix to return
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   204
   (flymake-haskell-multi-load t)
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   205
   (flymake-mode t)
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   206
   (capitalized-words-mode t)
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   207
   (turn-on-haskell-indent)
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   208
   (turn-on-haskell-doc-mode)
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   209
   (turn-on-haskell-decl-scan)
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   210
   (imenu-add-menubar-index t)
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   211
   (setq
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   212
    haskell-font-lock-haddock t
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   213
    haskell-stylish-on-save t
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   214
    haskell-program-name "ghci"
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   215
    haskell-indent-offset 4
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   216
    whitespace-line-column 78)
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   217
   ))
57
e35be98bd58c Tons more cleanups after emacs24 update.
Luke Hoersten <Luke@Hoersten.org>
parents: 56
diff changeset
   218
e35be98bd58c Tons more cleanups after emacs24 update.
Luke Hoersten <Luke@Hoersten.org>
parents: 56
diff changeset
   219
;;; ghci-mode
e35be98bd58c Tons more cleanups after emacs24 update.
Luke Hoersten <Luke@Hoersten.org>
parents: 56
diff changeset
   220
(add-hook 'inferior-haskell-mode-hook 'turn-on-ghci-completion)
e35be98bd58c Tons more cleanups after emacs24 update.
Luke Hoersten <Luke@Hoersten.org>
parents: 56
diff changeset
   221
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   222
;;; expand-region
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   223
(global-set-key (kbd "C-=") 'er/expand-region)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   224
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   225
;;; iy-go-to-char
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   226
(global-set-key (kbd "C-c f") 'iy-go-to-char)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   227
(global-set-key (kbd "C-c F") 'iy-go-to-char-backward)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   228
(global-set-key (kbd "C-c ;") 'iy-go-to-char-continue)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   229
(global-set-key (kbd "C-c ,") 'iy-go-to-char-continue-backward)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   230
57
e35be98bd58c Tons more cleanups after emacs24 update.
Luke Hoersten <Luke@Hoersten.org>
parents: 56
diff changeset
   231
;;; flymake-mode
e35be98bd58c Tons more cleanups after emacs24 update.
Luke Hoersten <Luke@Hoersten.org>
parents: 56
diff changeset
   232
(add-hook
e35be98bd58c Tons more cleanups after emacs24 update.
Luke Hoersten <Luke@Hoersten.org>
parents: 56
diff changeset
   233
 'flymake-mode-hook
e35be98bd58c Tons more cleanups after emacs24 update.
Luke Hoersten <Luke@Hoersten.org>
parents: 56
diff changeset
   234
 (lambda ()
e35be98bd58c Tons more cleanups after emacs24 update.
Luke Hoersten <Luke@Hoersten.org>
parents: 56
diff changeset
   235
   (local-set-key (kbd "C-1") 'flymake-display-err-menu-for-current-line)
e35be98bd58c Tons more cleanups after emacs24 update.
Luke Hoersten <Luke@Hoersten.org>
parents: 56
diff changeset
   236
   (local-set-key (kbd "C-.") 'flymake-goto-next-error)
e35be98bd58c Tons more cleanups after emacs24 update.
Luke Hoersten <Luke@Hoersten.org>
parents: 56
diff changeset
   237
   (local-set-key (kbd "C-,") 'flymake-goto-prev-error)
e35be98bd58c Tons more cleanups after emacs24 update.
Luke Hoersten <Luke@Hoersten.org>
parents: 56
diff changeset
   238
   ))
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   239
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   240
;;; multiple-cursors
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   241
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   242
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   243
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   244
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   245
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   246
;;; visual-regexp
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   247
(global-set-key (kbd "C-M-%") 'vr/query-replace)
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   248
(global-set-key (kbd "M-%") 'vr/replace)