init.el
author Luke Hoersten <Luke@Hoersten.org>
Mon, 16 May 2011 20:54:04 -0500
changeset 38 f4eee326b51c
parent 37 3c51085957be
child 39 5a7c0a0cab49
permissions -rw-r--r--
Removed unicode and pretty-modes for better alignment.
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
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
     5
;;;; General ;;;;
35
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
     6
(add-to-list 'load-path "~/.emacs.d")            ; set default emacs load path
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
     7
(add-to-list 'load-path "~/.emacs.d/thirdparty") ; set default third party path
0
c25fee3c92e9 Initial commit.
Luke Hoersten <Luke@Hoersten.org>
parents:
diff changeset
     8
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
     9
(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
    10
 ediff-split-window-function
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    11
  'split-window-horizontally              ; diff horizontally
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    12
 x-select-enable-clipboard t              ; paste from X buffer
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    13
 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
    14
 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
    15
 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
    16
 split-width-threshold 181                ; min width to split window horizontially
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
    17
 reb-re-syntax 'string)                   ; use string syntax for regexp builder
0
c25fee3c92e9 Initial commit.
Luke Hoersten <Luke@Hoersten.org>
parents:
diff changeset
    18
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    19
(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
    20
(put 'narrow-to-region 'disabled nil)     ; enable hiding
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    21
(put 'narrow-to-page 'disabled nil)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    22
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    23
(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
    24
(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
    25
(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
    26
(fset 'yes-or-no-p 'y-or-n-p)             ; replace yes/no prompts
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    27
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    28
;;; coding
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    29
(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
    30
(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
    31
(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
    32
(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
    33
(setq-default compile-command "scons ")   ; compile command
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
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    36
(global-set-key
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    37
 (kbd "C-c C-c")
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    38
 'comment-or-uncomment-region)            ; toggle region comment
0
c25fee3c92e9 Initial commit.
Luke Hoersten <Luke@Hoersten.org>
parents:
diff changeset
    39
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    40
;;; Darwin
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    41
(if (string-match "darwin" (emacs-version))
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    42
    (progn
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    43
      (setq-default ns-command-modifier 'control)
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    44
      (tabbar-mode nil)
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    45
      (menu-bar-mode t)))
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
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    48
(if window-system
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    49
    (progn
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    50
      (defun get-font ()
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    51
        "Get appropriate font based on system and hostname."
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    52
        (cond
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    53
         ((string-match "darwin" (emacs-version)) "Menlo-12")
35
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
    54
         ((string-match "HoldenCaulfield" (system-name)) "monospace-6")
36
d915699fbc26 Removed extranious lambda quotes.
Luke Hoersten <Luke@Hoersten.org>
parents: 35
diff changeset
    55
         ((string-match "lhoersten-66113" (system-name)) "monospace-8")
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    56
         ("monospace-10")))
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    57
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    58
      (tool-bar-mode -1)      ; remove tool bar
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    59
      (scroll-bar-mode -1)    ; remove scroll bar
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    60
      (visual-line-mode t)    ; word wrap break on whitespace
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    61
      (global-hl-line-mode t) ; highlight current line
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    62
      (set-frame-font (get-font))
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    63
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    64
      ;; twilight theme
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    65
      (require 'color-theme)
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    66
      (load "color-theme-twilight")
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    67
      (color-theme-twilight)
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    68
      ))
0
c25fee3c92e9 Initial commit.
Luke Hoersten <Luke@Hoersten.org>
parents:
diff changeset
    69
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    70
;;; terminal
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    71
(global-set-key (kbd "C-c s") 'eshell) ; start shell
34
8e91ec6fd0a2 Added eclipse-style line moving and eshell init.
Luke Hoersten <Luke@Hoersten.org>
parents: 33
diff changeset
    72
(add-hook
8e91ec6fd0a2 Added eclipse-style line moving and eshell init.
Luke Hoersten <Luke@Hoersten.org>
parents: 33
diff changeset
    73
 'eshell-mode-hook
36
d915699fbc26 Removed extranious lambda quotes.
Luke Hoersten <Luke@Hoersten.org>
parents: 35
diff changeset
    74
 (lambda ()
d915699fbc26 Removed extranious lambda quotes.
Luke Hoersten <Luke@Hoersten.org>
parents: 35
diff changeset
    75
   (setenv "TERM" "emacs") ; enable colors
d915699fbc26 Removed extranious lambda quotes.
Luke Hoersten <Luke@Hoersten.org>
parents: 35
diff changeset
    76
   (setenv "PATH" (concat "/opt/ghc7/bin:" "~/.cabal/bin:" (getenv "PATH")))))
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    77
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    78
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    79
;;;; 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
    80
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    81
;;; text-mode
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    82
(add-hook 'text-mode-hook 'flyspell-mode t)             ; spellcheck text
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    83
(add-hook 'text-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
    84
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    85
;;; ido-mode
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    86
(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
    87
(setq-default
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    88
 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
    89
 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
    90
 ido-everywhere t)                                      ; use ido where possible
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    91
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    92
;;; whitespace-mode
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    93
(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
    94
(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
    95
(setq-default
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    96
 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
    97
 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
    98
 '(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
    99
            space-before-tab space-after-tab))
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   100
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   101
;;; python-mode
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   102
(add-hook
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   103
 'python-mode-hook
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   104
 (lambda ()
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   105
   (setq
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   106
    tab-width 3
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   107
    python-indent 3
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   108
    indent-tabs-mode t)))
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   109
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   110
;;; haskell-mode
35
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   111
;; scion
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   112
(if (file-exists-p "~/.cabal/share/scion-0.1.0.10/emacs")
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   113
    (progn
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   114
      (add-to-list 'load-path "~/.cabal/share/scion-0.1.0.10/emacs")
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   115
      (require 'scion)
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   116
      (setq scion-program "~/.cabal/bin/scion-server")
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   117
      (add-hook
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   118
       'haskell-mode-hook
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   119
       (lambda ()
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   120
         (scion-mode 1)
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   121
         (scion-flycheck-on-save 1)
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   122
         (setq scion-completing-read-function 'ido-completing-read)))))
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   123
25
303d1b762ccc Added more haskell mode settings
Luke Hoersten <Luke@Hoersten.org>
parents: 23
diff changeset
   124
(add-hook
303d1b762ccc Added more haskell mode settings
Luke Hoersten <Luke@Hoersten.org>
parents: 23
diff changeset
   125
 'haskell-mode-hook
303d1b762ccc Added more haskell mode settings
Luke Hoersten <Luke@Hoersten.org>
parents: 23
diff changeset
   126
 (lambda ()
26
bd86fe64dfc8 Added OS specific configs.
Luke Hoersten <Luke@Hoersten.org>
parents: 25
diff changeset
   127
   (haskell-indentation-mode nil)
bd86fe64dfc8 Added OS specific configs.
Luke Hoersten <Luke@Hoersten.org>
parents: 25
diff changeset
   128
   (haskell-indent-mode t)
bd86fe64dfc8 Added OS specific configs.
Luke Hoersten <Luke@Hoersten.org>
parents: 25
diff changeset
   129
   (capitalized-words-mode t)
bd86fe64dfc8 Added OS specific configs.
Luke Hoersten <Luke@Hoersten.org>
parents: 25
diff changeset
   130
   (haskell-doc-mode t)
25
303d1b762ccc Added more haskell mode settings
Luke Hoersten <Luke@Hoersten.org>
parents: 23
diff changeset
   131
   (setq
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   132
    haskell-indent-offset 4
35
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   133
    whitespace-line-column 120))
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
   134
 t) ; append instead of prepend else haskell-mode overwrites these settings
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
   135
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   136
;;; org-mode
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   137
(add-hook
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   138
 'org-mode-hook
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   139
 (lambda ()
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   140
   (local-set-key (kbd "M-p") 'org-move-item-up)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   141
   (local-set-key (kbd "M-S-p") 'org-move-subtree-up)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   142
   (local-set-key (kbd "M-n") 'org-move-item-down)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   143
   (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
   144
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
   145
;;; ibuffer
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
   146
(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
   147
(setq-default
33
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   148
 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
   149
 ibuffer-saved-filter-groups
33
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   150
 '(("default"
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   151
    ("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
   152
    ("Haskell" (mode . haskell-mode))
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   153
    ("Python" (mode . python-mode))
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   154
    ("C++" (mode . c++-mode)))))
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   155
(add-hook
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   156
 'ibuffer-mode-hook
36
d915699fbc26 Removed extranious lambda quotes.
Luke Hoersten <Luke@Hoersten.org>
parents: 35
diff changeset
   157
 (lambda ()
d915699fbc26 Removed extranious lambda quotes.
Luke Hoersten <Luke@Hoersten.org>
parents: 35
diff changeset
   158
   (ido-mode t)
d915699fbc26 Removed extranious lambda quotes.
Luke Hoersten <Luke@Hoersten.org>
parents: 35
diff changeset
   159
   (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
   160
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
   161
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
   162
;;;; Requires ;;;;
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   163
37
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   164
(require 'hoersten-c-style)   ; load c specific lisp
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   165
(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
   166
(require 'pastebin-region)    ; send selected text to pastebin
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   167
(require 'move-line)          ; move line up or down
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   168
(require 'vala-mode)          ; vala programming language
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   169
(require 'rainbow-delimiters) ; multi-colored parens
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   170
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   171
;;; yasnippets
35
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   172
(add-to-list 'load-path "~/.emacs.d/thirdparty/yasnippet")
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   173
(require 'yasnippet)
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   174
(yas/initialize)
35
4a9c440b6764 Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents: 34
diff changeset
   175
(yas/load-directory "~/.emacs.d/thirdparty/yasnippet/snippets")
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   176
(setq-default yas/prompt-functions '(yas/ido-prompt yas/dropdown-prompt)) ; use ido for multiple snippets
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   177
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   178
;;; zencoding-mode - html
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   179
(require 'zencoding-mode)
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   180
(add-hook 'sgml-mode-hook 'zencoding-mode) ; Auto-start on any markup modes
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   181
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   182
;;; unique buffer names with dirs
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   183
(require 'uniquify)
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   184
(setq
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   185
 uniquify-buffer-name-style 'post-forward
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   186
 uniquify-separator ":")
37
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   187
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   188
;;; 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
   189
(mapc
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   190
 (lambda (x)
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   191
   (add-hook x 'linum-mode)
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   192
   (add-hook x 'rainbow-delimiters-mode))
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   193
 '(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
   194
   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
   195
   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
   196
   haskell-mode-hook
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))