init.el
author Luke Hoersten <luke@hoersten.org>
Fri, 18 Sep 2015 17:39:07 -0500
changeset 82 12cf67bc486c
parent 78 7d7662fcc8d1
child 84 2ad7a42a31f7
permissions -rw-r--r--
Added paredit, flx-ido and projectile.
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 ;;;;
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
     5
(add-to-list 'load-path "~/.emacs.d/elisp")   ; 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
82
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
     8
 gc-cons-threshold 20000000                   ; gc every 20 MB allocated (form flx-ido docs)
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
     9
 ediff-split-window-function
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    10
 'split-window-horizontally                   ; diff horizontally
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    11
 inhibit-splash-screen t                      ; disable splash screen
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    12
 truncate-lines t                             ; truncate, not wrap, lines
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    13
 indent-tabs-mode nil                         ; only uses spaces for indentation
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    14
 split-width-threshold 181                    ; min width to split window horizontially
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    15
 split-height-threshold 120                   ; min width to split window vertically
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    16
 reb-re-syntax 'string                        ; use string syntax for regexp builder
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    17
 require-final-newline 'visit-save)           ; add a newline automatically
0
c25fee3c92e9 Initial commit.
Luke Hoersten <Luke@Hoersten.org>
parents:
diff changeset
    18
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    19
(put 'set-goal-column 'disabled nil)          ; enable goal column setting
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
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
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    23
(column-number-mode t)                        ; show column numbers
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    24
(delete-selection-mode t)                     ; replace highlighted text
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    25
(windmove-default-keybindings)                ; move between windows with shift-arrow
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    26
(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
    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
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    30
(which-func-mode t)                           ; show current function
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    31
(transient-mark-mode t)                       ; show highlighting
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    32
(global-font-lock-mode t)                     ; syntax highlighting
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    33
(global-set-key (kbd "C-c c") 'compile)       ; compile
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    34
(global-set-key (kbd "C-c r") 'recompile)     ; recompile
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    35
(global-set-key (kbd "C-c a") 'align-regexp)  ; align
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    36
(global-set-key (kbd "C-c g") 'rgrep)         ; grep
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    37
(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
    38
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
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    41
(setq is-mac (equal system-type 'darwin))
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    42
(when is-mac
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    43
  (setq-default
66
b6182e0be08d Removed bell and added menu bar on OS X.
Luke Hoersten <Luke@Hoersten.org>
parents: 65
diff changeset
    44
   ring-bell-function 'ignore
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    45
   mac-command-modifier 'meta
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    46
   ns-pop-up-frames nil
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    47
   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
    48
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
    49
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    50
;;; Xorg
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    51
(when window-system
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    52
  (tool-bar-mode -1)                          ; remove tool bar
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    53
  (scroll-bar-mode -1)                        ; remove scroll bar
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    54
  (unless is-mac (menu-bar-mode -1))          ; remove menu bar
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    55
  (visual-line-mode t)                        ; word wrap break on whitespace
71
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
    56
  (set-default-font (if is-mac "Ubuntu Mono-12" "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
    57
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
    58
82
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    59
;;;; Packages ;;;;
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    60
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    61
(require 'package-require)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    62
(package-require '(company exec-path-from-shell expand-region
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    63
 smex markdown-mode markdown-mode+ ix hgignore-mode move-text paredit
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    64
 rainbow-delimiters rainbow-mode json-mode json-reformat
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    65
 solarized-theme terraform-mode visual-regexp yasnippet yaml-mode
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    66
 zencoding-mode))
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    67
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    68
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    69
;;; custom requires
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    70
(require 'haskell-init)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    71
(require 'javascript-init)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    72
(require 'c-init)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    73
(require 'ansible-init)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    74
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    75
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    76
;;; text-mode
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    77
(add-hook 'fundamental-mode-hook 'flyspell-mode)      ; spellcheck text
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    78
(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
    79
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
    80
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    81
;;; whitespace-mode
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    82
(global-whitespace-mode t)                            ; show whitespace
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    83
(add-hook 'before-save-hook 'whitespace-cleanup)      ; cleanup whitespace on exit
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    84
(setq-default
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    85
 whitespace-line-column 120                           ; column width
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    86
 whitespace-style                                     ; whitespace to highlight
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    87
 '(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
    88
            space-before-tab space-after-tab))
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    89
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
    90
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    91
;;; org-mode
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    92
(add-hook
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    93
 'org-mode-hook
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    94
 (lambda ()
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    95
   (local-set-key (kbd "M-p") 'org-move-item-up)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    96
   (local-set-key (kbd "M-S-p") 'org-move-subtree-up)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    97
   (local-set-key (kbd "M-n") 'org-move-item-down)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    98
   (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
    99
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   100
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
   101
;;; ibuffer
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
   102
(global-set-key (kbd "C-x C-b") 'ibuffer)             ; better buffer browser
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
   103
(setq-default
33
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   104
 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
   105
 ibuffer-saved-filter-groups
33
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   106
 '(("default"
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   107
    ("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
   108
    ("Haskell" (mode . haskell-mode))
72
65194c801e61 Tons of updates.
Luke Hoersten <Luke@Hoersten.org>
parents: 71
diff changeset
   109
    ("Cabal" (mode . haskell-cabal-mode))
33
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   110
    ("Python" (mode . python-mode))
48
f17ebf233431 More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents: 47
diff changeset
   111
    ("Jython" (mode . jython-mode))
52
b54c3f2e12f6 Added clojure mode to ibuffer.
Luke Hoersten <Luke@Hoersten.org>
parents: 50
diff changeset
   112
    ("Clojure" (mode . clojure-mode))
53
0b3217376059 Minor haskell updates.
Luke Hoersten <Luke@Hoersten.org>
parents: 52
diff changeset
   113
    ("Markup" (mode . sgml-mode))
0b3217376059 Minor haskell updates.
Luke Hoersten <Luke@Hoersten.org>
parents: 52
diff changeset
   114
    ("HTML" (mode . html-mode))
0b3217376059 Minor haskell updates.
Luke Hoersten <Luke@Hoersten.org>
parents: 52
diff changeset
   115
    ("CSS" (mode . css-mode))
33
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   116
    ("C++" (mode . c++-mode)))))
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   117
(add-hook
3be3d7b4cae4 Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents: 32
diff changeset
   118
 'ibuffer-mode-hook
82
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   119
 (lambda () (ibuffer-switch-to-saved-filter-groups "default")))
73
8167de2d2daa Lots of random changes. Stopped using Chris Done's haskell-flycheck.
Luke Hoersten <Luke@Hoersten.org>
parents: 72
diff changeset
   120
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   121
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   122
;;; shell
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
   123
(global-set-key (kbd "C-c s") 'eshell)  ; start shell
77
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   124
(exec-path-from-shell-copy-env "PYTHONPATH")
73
8167de2d2daa Lots of random changes. Stopped using Chris Done's haskell-flycheck.
Luke Hoersten <Luke@Hoersten.org>
parents: 72
diff changeset
   125
(exec-path-from-shell-initialize)
8167de2d2daa Lots of random changes. Stopped using Chris Done's haskell-flycheck.
Luke Hoersten <Luke@Hoersten.org>
parents: 72
diff changeset
   126
(eshell)
8167de2d2daa Lots of random changes. Stopped using Chris Done's haskell-flycheck.
Luke Hoersten <Luke@Hoersten.org>
parents: 72
diff changeset
   127
(add-hook 'eshell-mode-hook (lambda () (setenv "TERM" "emacs")))
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   128
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   129
77
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   130
;;; ido / smex / completion
82
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   131
(setq-default
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   132
 ido-enable-flex-matching t                           ; fuzzy matching for ido mode
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   133
 ido-create-new-buffer 'always                        ; create new buffer without prompt
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   134
 ido-max-window-height 1                              ; max ido window height
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   135
 ido-everywhere t                                     ; use ido where possible
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   136
 ido-use-faces nil)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   137
(ido-mode t)                                          ; file/buffer selector
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   138
(flx-ido-mode t)
76
af643427e1be Added ido-at-point completion.
Luke Hoersten <Luke@Hoersten.org>
parents: 75
diff changeset
   139
(global-set-key (kbd "M-/") 'completion-at-point)
77
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   140
(global-set-key (kbd "M-x") 'smex)
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   141
(global-set-key (kbd "M-X") 'smex-major-mode-commands)
76
af643427e1be Added ido-at-point completion.
Luke Hoersten <Luke@Hoersten.org>
parents: 75
diff changeset
   142
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   143
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   144
;;; emacs-lisp-mode
82
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   145
(add-hook
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   146
 'emacs-lisp-mode-hook
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   147
 (lambda ()
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   148
   (rainbow-mode)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   149
   (enable-paredit-mode)))
77
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   150
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   151
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   152
;;; company-mode
74
1ec54926890f Added an unused heml-init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 73
diff changeset
   153
(add-hook 'after-init-hook 'global-company-mode)
77
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   154
(global-set-key (kbd "M-/") 'company-complete)
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   155
(setq-default
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   156
 company-idle-delay nil
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   157
 company-minimum-prefix-length 2
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   158
 company-selection-wrap-around t
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   159
 company-show-numbers t
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   160
 company-tooltip-align-annotations t)
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   161
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   162
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   163
;;; uniquify
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
   164
(require 'uniquify)                     ; unique buffer names with dirs
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   165
(setq
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   166
 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
   167
 uniquify-separator ":")
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   168
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   169
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   170
;;; color-theme
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   171
(setq-default
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   172
 custom-safe-themes
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   173
 '("8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4"
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   174
   "d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" default))
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   175
(load-theme 'solarized-light)
42
ade8c2cc1b04 Fixed some minor bugs.
Luke Hoersten <Luke@Hoersten.org>
parents: 40
diff changeset
   176
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   177
82
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   178
;;; show-paren-mode - needs to be loaded after theme
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   179
(setq-default
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   180
 show-paren-style 'expression
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   181
 show-paren-delay 0)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   182
(set-face-attribute
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   183
 'show-paren-match nil
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   184
 :background (face-background 'highlight)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   185
 :foreground (face-foreground 'highlight))
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   186
(show-paren-mode t)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   187
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   188
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   189
;;; yasnippets
54
e1b82f67f96e Cleaned up unused modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 53
diff changeset
   190
(setq-default yas-prompt-functions '(yas-ido-prompt yas-dropdown-prompt)) ; use ido for multiple snippets
e1b82f67f96e Cleaned up unused modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 53
diff changeset
   191
(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
   192
71
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   193
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   194
;;; markdown-mode
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   195
(add-hook 'markdown-mode-hook 'flyspell-mode)
82
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   196
(setq-default markdown-command "pandoc -f markdown_github")
71
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   197
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   198
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   199
;;; html-mode
53
0b3217376059 Minor haskell updates.
Luke Hoersten <Luke@Hoersten.org>
parents: 52
diff changeset
   200
(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
   201
(add-hook
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   202
 'html-mode-hook
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   203
 (lambda ()
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   204
   (zencoding-mode)
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   205
   (rainbow-mode)))
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   206
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   207
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   208
;;; css-mode
63
814f5588d0d4 Fixed mode hooks to all be functions.
Luke Hoersten <Luke@Hoersten.org>
parents: 62
diff changeset
   209
(add-hook 'css-mode-hook 'rainbow-mode)
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   210
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   211
37
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   212
;;; 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
   213
(mapc
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   214
 (lambda (x)
60
8beb028f936c Fixed a bug with the haskell-mode-hook
Luke Hoersten <Luke@Hoersten.org>
parents: 59
diff changeset
   215
   (add-hook x
65
839e0a541c76 Updates to moveline.
Luke Hoersten <Luke@Hoersten.org>
parents: 64
diff changeset
   216
    (lambda ()
839e0a541c76 Updates to moveline.
Luke Hoersten <Luke@Hoersten.org>
parents: 64
diff changeset
   217
      (linum-mode t)
73
8167de2d2daa Lots of random changes. Stopped using Chris Done's haskell-flycheck.
Luke Hoersten <Luke@Hoersten.org>
parents: 72
diff changeset
   218
      (subword-mode t)
8167de2d2daa Lots of random changes. Stopped using Chris Done's haskell-flycheck.
Luke Hoersten <Luke@Hoersten.org>
parents: 72
diff changeset
   219
      (rainbow-delimiters-mode t))))
37
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   220
 '(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
   221
   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
   222
   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
   223
   haskell-mode-hook
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   224
   js2-mode-hook
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   225
   html-mode-hook
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   226
   css-mode-hook
50
6590d340a568 Added clojure mode.
Luke Hoersten <Luke@Hoersten.org>
parents: 48
diff changeset
   227
   clojure-mode-hook
77
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   228
   emacs-lisp-mode-hook
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   229
   conf-mode-hook
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   230
   yaml-mode-hook))
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   231
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   232
71
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   233
;;; expand-region
72
65194c801e61 Tons of updates.
Luke Hoersten <Luke@Hoersten.org>
parents: 71
diff changeset
   234
(global-set-key (kbd "C-=") 'er/expand-region)
69
b3baf25406f8 Messing with new haskell mode.
Luke Hoersten <Luke@Hoersten.org>
parents: 68
diff changeset
   235
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   236
71
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   237
;;; move-text
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   238
(global-set-key (kbd "M-p") 'move-text-up)
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   239
(global-set-key (kbd "M-n") 'move-text-down)
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   240
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   241
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   242
;;; visual-regexp
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   243
(global-set-key (kbd "C-M-%") 'vr/query-replace)
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   244
(global-set-key (kbd "M-%") 'vr/replace)