-
Notifications
You must be signed in to change notification settings - Fork 5
/
emacs
164 lines (153 loc) · 5.87 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
;; El-Get {{{
;; --------------------------------------------------------------------------
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
;; Long form of (require 'el-get)
(unless (require 'el-get nil 'noerror)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/dimitri/el-get/master/el-get-install.el")
(goto-char (point-max))
(eval-print-last-sexp)
)
)
(add-to-list 'el-get-recipe-path "~/.emacs.d/el-get-user/recipes")
;; Packages I want installed and updated
(setq my-packages
(append '(
color-theme
color-theme-almost-monokai
color-theme-solarized
org-mode
evil
el-get
)
;; Plus everything that is include in el-get-sources
(mapcar 'el-get-source-name el-get-sources)
)
)
;; Remove any packages not mentioned in the list above
(el-get-cleanup my-packages)
;; Install and init the packages from the list
(el-get 'sync my-packages)
;; }}}
;; Enable modal editing with vim-like behaviour {{{
;; --------------------------------------------------------------------------
(evil-mode 1)
;; }}}
;; Custom set variables, faces {{{
;; --------------------------------------------------------------------------
(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.
'(column-number-mode t)
'(display-time-mode t)
'(indicate-empty-lines t)
'(inhibit-startup-screen t)
'(tool-bar-mode nil))
;; --------------------------------------------------------------------------
(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.
; '(default ((t (:family "Ubuntu Mono" :foundry "unknown" :slant normal :weight normal :height 113 :width normal)))))
'(default ((t (:family "Monaco" :foundry "unknown" :slant normal :weight normal :height 98 :width normal)))))
;; }}}
;; Appearance {{{
;; --------------------------------------------------------------------------
(color-theme-almost-monokai)
;; }}}
;; Org-Mode {{{
;; --------------------------------------------------------------------------
;;
;;
;; Encrypting Specific Entries in an org File with org-crypt.
;; --------------------------------------------------------------------------
;; If you just want to encrypt the text of an entry, but not the headline, or
;; properties you can use org-crypt. In order to use org-crypt you need to add
;; something like the following to your .emacs:
(require 'org-crypt)
(org-crypt-use-before-save-magic)
(setq org-tags-exclude-from-inheritance (quote ("crypt")))
;; GPG key to use for encryption
;; Either the Key ID or set to nil to use symmetric encryption.
(setq org-crypt-key nil)
;; Active Babel languages
;; --------------------------------------------------------------------------
(org-babel-do-load-languages
'org-babel-load-languages
'(
(R . t)
(ditaa . t)
(python . t)
(sh . t)
)
)
;; Languages table {{{
;; ---------------------------------------------------------
;; | Language | Identifier | Language | Identifier |
;; |------------+------------+----------------+------------|
;; | Asymptote | asymptote | Awk | awk |
;; | Emacs Calc | calc | C | C |
;; | C++ | C++ | Clojure | clojure |
;; | CSS | css | ditaa | ditaa |
;; | Graphviz | dot | Emacs Lisp | emacs-lisp |
;; | gnuplot | gnuplot | Haskell | haskell |
;; | Javascript | js | LaTeX | latex |
;; | Ledger | ledger | Lisp | lisp |
;; | Lilypond | lilypond | MATLAB | matlab |
;; | Mscgen | mscgen | Objective Caml | ocaml |
;; | Octave | octave | Org-mode | org |
;; | | | Perl | perl |
;; | Plantuml | plantuml | Python | python |
;; | R | R | Ruby | ruby |
;; | Sass | sass | Scheme | scheme |
;; | GNU Screen | screen | shell | sh |
;; | SQL | sql | SQLite | sqlite |
;; ---------------------------------------------------------
;; }}}
;;
;;
;; Agenda files
;; --------------------------------------------------------------------------
'(setq org-agenda-files '("~/doc/PKB"))
;;
;;
;; Image resizing
;; --------------------------------------------------------------------------
;; if there is a #+ATTR.*: width="200", resize to 200, otherwise don't resize
(setq org-image-actual-width nil)
;;
;;
;; Fontify code in code blocks
;; --------------------------------------------------------------------------
(setq org-src-fontify-natively t)
;;
;;
;; Key bindings
;; --------------------------------------------------------------------------
;; The four Org commands org-store-link, org-capture, org-agenda, and
;; org-iswitchb should be accessible through global keys (i.e. anywhere in
;; Emacs, not just in Org buffers).
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(add-hook 'org-mode-hook
(lambda ()
(local-set-key "\M-n" 'outline-next-visible-heading)
(local-set-key "\M-p" 'outline-previous-visible-heading)
;; display images
(local-set-key "\M-I" 'org-toggle-iimage-in-org)
(load-theme 'leuven t)
)
)
;; }}}
;; Funniest part of the file {{{
;; --------------------------------------------------------------------------
;; A vim modeline :)
;;
;; vim: fdm=marker :
;; }}}