-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.emacs
74 lines (57 loc) · 2.3 KB
/
.emacs
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
; Global
(setq-default indent-tabs-mode nil)
(setq-default tab-width 2)
(setq css-indent-offset 2)
(setq show-trailing-whitespace t)
(add-to-list 'load-path "~/.emacs.d")
(let ((default-directory "~/.emacs.d"))
(normal-top-level-add-subdirs-to-load-path))
; My PHP setup
(add-hook 'php-mode-hook 'my-php-mode)
(autoload 'php-mode "php-mode" "Major mode for editing php code." t)
(autoload 'php-electric-mode "php-electric" "Enhancements for php mode." t)
(autoload 'drupal-mode "drupal-mode" "Minor mode for editing Drupal PHP files." t)
(autoload 'js2-mode "js2" nil t)
; Markdown mode
(autoload 'markdown-mode "markdown-mode.elc" "Majore mode for editing Markdown files" t)
(setq auto-mode-alist (cons '("\\.md" . markdown-mode) auto-mode-alist))
; Puppet mode
(autoload 'puppet-mode "puppet-mode" "Major mode for editing Puppet files" t)
(setq auto-mode-alist (cons '("\\.pp" . puppet-mode) auto-mode-alist))
; Drupal
(add-to-list 'auto-mode-alist '("\\.\\(module\\|test\\|install\\|theme\\|php\\|profile\\)$" . drupal-mode))
(add-to-list 'auto-mode-alist '("/drupal.*\\.\\(php\\|inc\\)$" . drupal-mode))
(add-to-list 'auto-mode-alist '("\\.\\(info\\|make\\)$" . conf-windows-mode))
(add-to-list 'auto-mode-alist '("\\.\\(js\\|json\\)$" . js2-mode))
; Geben
(autoload 'geben "geben" "PHP Debugger on Emacs" t)
; Git
(autoload 'git "git" "Emacs git integration" t)
(put 'downcase-region 'disabled nil)
(show-paren-mode 1)
(setq show-paren-delay 0)
(put 'upcase-region 'disabled nil)
; Cucumber
(add-to-list 'load-path "~/.emacs.d/cucumber.el")
(require 'feature-mode)
(add-to-list 'auto-mode-alist '("\.feature$" . feature-mode))
; SCSS
(add-to-list 'load-path (expand-file-name "~/.emacs.d/scss-mode"))
(require 'scss-mode)
(add-to-list 'auto-mode-alist '("\\.scss\\'" . scss-mode))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(scss-compile-at-save nil))
; YAML mode.
(require 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
; Solarized dark theme
(require 'color-theme-solarized)
(require 'color-theme)
(eval-after-load "color-theme"
'(progn
(color-theme-initialize)
(color-theme-solarized-dark)))