-
Notifications
You must be signed in to change notification settings - Fork 0
/
emacs.cfg
73 lines (59 loc) · 2.23 KB
/
emacs.cfg
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
(tool-bar-mode -1);; disable toolbar
(require 'tabbar)
(tabbar-mode t)
; define all tabs to be one of 3 possible groups: “Emacs Buffer”, “Dired”,
;“User Buffer”.
(defun tabbar-buffer-groups ()
"Return the list of group names the current buffer belongs to.
This function is a custom function for tabbar-mode's tabbar-buffer-groups.
This function group all buffers into 3 groups:
Those Dired, those user buffer, and those emacs buffer.
Emacs buffer are those starting with “*”."
(list
(cond
((string-equal "*" (substring (buffer-name) 0 1))
"Emacs Buffer"
)
((eq major-mode 'dired-mode)
"Dired"
)
(t
"User Buffer"
)
)))
(setq tabbar-buffer-groups-function 'tabbar-buffer-groups)
(global-set-key [S-left] 'tabbar-backward) ;; tabbar buffers
(global-set-key [S-right] 'tabbar-forward)
;;load erlang mode
(setq load-path (cons "/opt/erlang/r15b01/lib/tools-2.6.7/emacs"
load-path))
(setq erlang-root-dir "/opt/erlang/r15b01/")
(setq exec-path (cons "/opt/erlang/r15b01/bin" exec-path))
(require 'erlang-start)
;;to set foreground color to white
(set-foreground-color "white")
;;to set background color to black
(set-background-color "#141414")
(set-default-font "-*-terminus-medium-*-*-*-16-*-*-*-*-*-*-*")
(custom-set-variables
'(inhibit-startup-screen t))
;;settings for distel
(add-to-list 'load-path "/opt/distel/share/distel/elisp")
(require 'distel)
(distel-setup)
(setq erl-nodename-cache 'distel@localhost)
;; A number of the erlang-extended-mode key bindings are useful in the shell too
(defconst distel-shell-keys
'(("\C-\M-i" erl-complete)
("\M-?" erl-complete)
("\C-q" erl-complete)
("\M-." erl-find-source-under-point)
("\M-," erl-find-source-unwind)
("\M-*" erl-find-source-unwind)
)
"Additional keys to bind when in Erlang shell.")
(add-hook 'erlang-shell-mode-hook
(lambda ()
;; add some Distel bindings to the Erlang shell
(dolist (spec distel-shell-keys)
(define-key erlang-shell-mode-map (car spec) (cadr spec)))))