-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.emacs
127 lines (102 loc) · 3.83 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
;;; package --- Fredriks .emacs
;;; Commentary: Fredriks
;;; Code: none
(require 'package)
(require 'misc)
(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.
'(global-linum-mode t)
'(column-number-mode t)
'(scroll-preserve-screen-position)
'(haskell-process-type (quote stack-ghci))
'(package-archives
(quote
(("gnu" . "http://elpa.gnu.org/packages/")
("melpa-stable" . "http://stable.melpa.org/packages/"))))
'(show-paren-delay 0)
'(show-paren-style 'mixed)
'(truncate-lines t))
(package-initialize)
;;(package-install 'flycheck)
(add-hook 'after-init-hook #'global-flycheck-mode)
(require 'guide-key)
(setq guide-key/guide-key-sequence '("C-c"))
(guide-key-mode 1)
;; match parenthesis
(show-paren-mode 1)
;; (setq show-paren-delay 0)
;; (setq show-paren-style 'mixed)
;; Hide menu and toolbar
(menu-bar-mode -1)
(if (display-graphic-p)
(progn
(tool-bar-mode -1)))
;; Bind M-f to forward-to-word
(global-set-key (kbd "M-f") 'forward-to-word)
;; Use ibuffer instead of buffer list
(global-set-key (kbd "C-x C-b") 'ibuffer)
;; No start screen
(setq inhibit-startup-message t)
;; Add HOME/bin to path
(setq exec-path (append exec-path '("~/bin")))
;; Save temp files in /tmp
(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))
;; Erlang
(when (file-exists-p "/opt/local/lib/erlang/lib/tools-2.8.2/emacs")
(setq load-path (cons "/opt/local/lib/erlang/lib/tools-2.8.2/emacs"
load-path))
(setq erlang-root-dir "/opt/local/lib/erlang")
(setq exec-path (cons "/opt/local/bin" exec-path))
(require 'erlang-start)
)
;; Tail-f
(require 'cl)
(when (file-exists-p "/Users/frjansso/dev/confd-6.1/devel_support/lib/emacs/tail-f.el")
(load-file "/Users/frjansso/dev/confd-6.1/devel_support/lib/emacs/tail-f.el"))
(custom-set-faces
;; custom-set-faces 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.
)
;; Haskell
(eval-after-load "haskell-mode"
'(progn
(define-key haskell-mode-map (kbd "C-x C-d") nil)
(define-key haskell-mode-map (kbd "C-c C-z") 'haskell-interactive-switch)
(define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-file)
(define-key haskell-mode-map (kbd "C-c C-b") 'haskell-interactive-switch)
(define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type)
(define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info)
(define-key haskell-mode-map (kbd "C-c M-.") nil)
(define-key haskell-mode-map (kbd "C-c C-d") nil)))
;; Fix ctrl-up and ctrl-down
(define-key input-decode-map "\e[1;5A" [C-up])
(define-key input-decode-map "\e[1;5B" [C-down])
(defalias 'list-buffers 'ibuffer)
(setq ibuffer-saved-filter-groups
(quote (("default"
("erlang" (mode . erlang-mode))
("haskell" (mode . haskell-mode))
("yang" (mode . yang-mode))
("lux" (mode . lux-mode))
("xml" (or
(mode . nxml-mode)
(mode . xml-mode)))
("dired" (mode . dired-mode))
("cli-spec" (name . ".*\.cli"))
("support-mail" (name . "support\.tail-f.*"))
("emacs" (or
(name . "^\\*scratch\\*$")
(name . "^\\*Messages\\*$")))))))
(add-hook 'ibuffer-mode-hook
(lambda ()
(ibuffer-switch-to-saved-filter-groups "default")))
(provide '.emacs)
;;; .emacs ends here