forked from evangineer/aquamacs-emacs-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
97 lines (84 loc) · 3.03 KB
/
init.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
;; init.el
;;
;; Trigger loading of Aquamacs Emacs Starter Kit customizations, etc.
;; Inspired by http://github.com/technomancy/emacs-starter-kit/.
;;
;; Walter McGinnis, 2009-06-28
;;
;; http://github.com/walter/aquamacs-emacs-starter-kit
;;
;; Mamading Ceesay, 2010-02-14
;;
;; http://github.com/evangineer/aquamacs-emacs-starter-kit
;;;;; IMPORTANT: put this commented code in ~/Library/Aquamacs Emacs/Preferences.el
;;;;; begin code for Preferences.el
;; Aquamacs Emacs Starter Kit
;; http://github.com/evangineer/aquamacs-emacs-starter-kit
;; set the kitfiles-dir variable to this directory
;; (setq kitfiles-dir (concat (file-name-directory
;; (or (buffer-file-name) load-file-name)) "/aquamacs-emacs-starter-kit"))
;;
;; set up our various directories to load
;; (add-to-list 'load-path kitfiles-dir)
;; (require 'init)
;;;;; begin code for Preferences.el
(add-to-list 'load-path (concat kitfiles-dir "/site-lisp"))
(load-file (concat kitfiles-dir "/site-lisp" "/package/package.el"))
;; Load up ELPA, the package manager
;; test that ~/.emacs.d
;; and ~/.emacs.d/elpa/ exist
;; make them if not
(unless (file-directory-p "~/.emacs.d/elpa")
(make-directory "~/.emacs.d/elpa" t))
(require 'package)
(package-initialize)
(require 'starter-kit-elpa)
;;;;; Vendor libs
;; general coding/editing niceties
(require 'line-num)
(require 'whitespace)
;; Additional Modes
(require 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
;; Mac OS X/iPhone oriented, thanks http://github.com/topfunky/emacs-starter-kit/topfunky.el
;; Applescript
(autoload 'applescript-mode "applescript-mode" "major mode for editing AppleScript source." t)
(setq auto-mode-alist
(cons '("\\.applescript$" . applescript-mode) auto-mode-alist))
;; xcode/cocoa specific
(require 'objc-c-mode)
(require 'xcode)
(define-key objc-mode-map [(meta r)] 'xcode-compile)
(define-key objc-mode-map [(meta K)] 'xcode-clean)
(add-hook 'c-mode-common-hook
(lambda()
(local-set-key [(meta O)] 'ff-find-other-file)))
(add-hook 'c-mode-common-hook
(lambda()
(local-set-key (kbd "C-c <right>") 'hs-show-block)
(local-set-key (kbd "C-c <left>") 'hs-hide-block)
(local-set-key (kbd "C-c <up>") 'hs-hide-all)
(local-set-key (kbd "C-c <down>") 'hs-show-all)
(hs-minor-mode t))) ; Hide and show blocks
;;;;; end Vendor libs
;;;;; Aquamacs Emacs Starter Kit specific customizations
(require 'adjust-path)
(require 'appearance)
(require 'auto-complete-setup)
(require 'csharp-mode-setup)
(require 'go-mode-setup)
(require 'ido-setup)
(require 'js2-mode-setup)
(require 'markdown-mode-setup)
(require 'org-mode-stuff)
(require 'override-aquamacs-to-be-more-emacsy)
(require 'prefer-utf)
(require 'rst-mode-setup)
(require 'sunrise-commander-setup)
(require 'twit-setup)
(require 'useful-functions)
(require 'yasnippet-setup)
;; contains whitespace config for various modes and more
(require 'misc-mode-tweaks)
;;;;; end Aquamacs Emacs Starter Kit specific customizations
(provide 'init)