init.el
1 |
|
2 |
;; Copyright © 2018-2022 Maarten Vangeneugden |
3 |
;; Author: Maarten Vangeneugden <contact_me@maartenv.be> |
4 |
;; URL: https://maartenv.be |
5 |
;; |
6 |
;; Welcome to Ghent Emacs. |
7 |
;; |
8 |
;; This is the configuration file for Ghent Emacs, a GNU Emacs derivative |
9 |
;; developed in the city of Ghent, Belgium, by a student of Engineering |
10 |
;; Informatics at Ghent University. |
11 |
;; |
12 |
;; License: GPLv3+ |
13 |
|
14 |
;; USAGE: |
15 |
;; This configuration file uses the use-package declaration, that means the |
16 |
;; settings are a bit different from what you'd normally do in a GNU Emacs |
17 |
;; init.el file. Consult https://github.com/jwiegley/use-package for info on how |
18 |
;; to correctly write package configuration. |
19 |
|
20 |
(eval-when-compile |
21 |
(require 'use-package)) |
22 |
;(require 'diminish) ;; if you use :diminish |
23 |
(require 'bind-key) ;; if you use any :bind variant |
24 |
|
25 |
(custom-set-variables |
26 |
;; custom-set-variables was added by Custom. |
27 |
;; If you edit it by hand, you could mess it up, so be careful. |
28 |
;; Your init file should contain only one such instance. |
29 |
;; If there is more than one, they won't work right. |
30 |
'(custom-safe-themes |
31 |
'("78e6be576f4a526d212d5f9a8798e5706990216e9be10174e3f3b015b8662e27" "d9646b131c4aa37f01f909fbdd5a9099389518eb68f25277ed19ba99adeb7279" "8b58ef2d23b6d164988a607ee153fd2fa35ee33efc394281b1028c2797ddeebb" "f9aede508e587fe21bcfc0a85e1ec7d27312d9587e686a6f5afdbb0d220eab50" "83ae405e25a0a81f2840bfe5daf481f74df0ddb687f317b5e005aa61261126e9" "c433c87bd4b64b8ba9890e8ed64597ea0f8eb0396f4c9a9e01bd20a04d15d358" "a24c5b3c12d147da6cef80938dca1223b7c7f70f2f382b26308eba014dc4833a" "732b807b0543855541743429c9979ebfb363e27ec91e82f463c91e68c772f6e3" "a2cde79e4cc8dc9a03e7d9a42fabf8928720d420034b66aecc5b665bbf05d4e9" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "bd7b7c5df1174796deefce5debc2d976b264585d51852c962362be83932873d9" default)) |
32 |
'(inhibit-startup-screen t) |
33 |
;; Font settings, ligatures and symbol config. set-frame-font has to be called |
34 |
;; here, because (for unknown reasons), if it's loaded in the old position, it |
35 |
;; will not set the font on my server's Emacs. (But it /will/ do so when |
36 |
;; inhibit-startup-screen is set to f, so I really have no clue how that works). |
37 |
(set-frame-font "Hack 11" nil t) |
38 |
'(package-selected-packages |
39 |
'(company-fuzzy web-mode use-package undo-tree srefactor spacemacs-theme spaceline solarized-theme smooth-scrolling rainbow-delimiters pretty-mode page-break-lines monokai-theme helm general evil dashboard dante company-ycmd company-flx company-anaconda clang-format cider auto-package-update auctex a)) |
40 |
'(spaceline-inflation 1 t nil "Customized with use-package spaceline") |
41 |
'(spaceline-toggle-buffer-size-off nil t nil "Customized with use-package spaceline")) |
42 |
;(custom-set-faces |
43 |
;; custom-set-faces was added by Custom. |
44 |
;; If you edit it by hand, you could mess it up, so be careful. |
45 |
;; Your init file should contain only one such instance. |
46 |
;; If there is more than one, they won't work right. |
47 |
;'(default ((((class color) (min-colors 89)) (:foreground "#ffffff" :background "#263238"))))) |
48 |
|
49 |
;; To get rid of those FUCKING ANNOYING BACKUP FILES FUCKING HELL DUDE |
50 |
(setq backup-directory-alist '(("." . "~/.emacs.d/backup")) |
51 |
backup-by-copying t ; Don't delink hardlinks |
52 |
version-control t ; Use version numbers on backups |
53 |
delete-old-versions t ; Automatically delete excess backups |
54 |
kept-new-versions 20 ; how many of the newest versions to keep |
55 |
kept-old-versions 5 ; and how many of the old |
56 |
) |
57 |
;; And yes I copied it from SO, suck it: https://stackoverflow.com/questions/2680389/how-to-remove-all-files-ending-with-made-by-emacs |
58 |
|
59 |
;; Disables the use of tabs, replaces them with spaces |
60 |
(setq-default indent-tabs-mode nil) |
61 |
|
62 |
;; Activate UTF-8 throughout Ghent Emacs |
63 |
(prefer-coding-system 'utf-8) |
64 |
(set-default-coding-systems 'utf-8) |
65 |
(set-terminal-coding-system 'utf-8) |
66 |
(set-keyboard-coding-system 'utf-8) |
67 |
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)) |
68 |
|
69 |
;; Line numbering config |
70 |
(global-display-line-numbers-mode) |
71 |
(setq display-line-numbers-mode t) |
72 |
(setq display-line-numbers-widen t) |
73 |
(setq display-line-numbers-type 'relative) |
74 |
(setq display-line-numbers-current-absolute t) |
75 |
|
76 |
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) |
77 |
(setq scroll-step 1) |
78 |
(setq scroll-margin 10) ;; Keeps 10 lines above and down always visible if still left |
79 |
|
80 |
;; Enable line breaks in all modes at column 80 |
81 |
(setq-default auto-fill-function 'do-auto-fill) |
82 |
(setq-default fill-column 80) |
83 |
|
84 |
(setq ring-bell-function 'ignore) ;; Disables the FUCKING ANNOYING BEEPS HOLY SHIT |
85 |
|
86 |
;; Setup packages |
87 |
;(package-initialize) |
88 |
(require 'package) |
89 |
(setq package-enable-at-startup nil) |
90 |
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/")) |
91 |
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) |
92 |
(unless (package-installed-p 'use-package) |
93 |
(package-refresh-contents) |
94 |
(package-install 'use-package)) |
95 |
|
96 |
|
97 |
|
98 |
|
99 |
;; Next two lines allow foregoing :ensure t on all packages |
100 |
;; :ensure t simply makes sure that, if a package isn't installed on this |
101 |
;; machine, it's automatically fetched and installed. |
102 |
;; This doesn't keep packages up-to-date, cfr. auto-package-update for that |
103 |
(require 'use-package-ensure) |
104 |
(setq use-package-always-ensure t) |
105 |
|
106 |
;; Package for automatic updating of all the other packages |
107 |
(use-package auto-package-update |
108 |
:config |
109 |
(setq auto-package-update-delete-old-versions t) |
110 |
(setq auto-package-update-hide-results t) |
111 |
(auto-package-update-maybe)) |
112 |
|
113 |
;; Easier keybindings so we can do more lazy loading |
114 |
(use-package general |
115 |
:config |
116 |
(general-create-definer my-leader-def |
117 |
;; :prefix my-leader |
118 |
:prefix "SPC") |
119 |
(general-create-definer local-leader-def |
120 |
;; :prefix local-leader |
121 |
:prefix ",")) |
122 |
|
123 |
(use-package dashboard |
124 |
:init |
125 |
(setq dashboard-banner-logo-title "") ; It's nicer to just not have a title text. |
126 |
(setq dashboard-startup-banner "~/ghent-emacs.png") |
127 |
:config |
128 |
(dashboard-setup-startup-hook)) |
129 |
|
130 |
;; AUCTeX configuration |
131 |
;; Partly inspired by https://piotr.is/2010/emacs-as-the-ultimate-latex-editor/ |
132 |
;;;;(use-package auctex |
133 |
;;:init |
134 |
;;(setq TeX-auto-save t) |
135 |
;;(setq TeX-parse-self t) |
136 |
;;(setq Tex-save-query nil) |
137 |
;;) |
138 |
|
139 |
;; Updates all packages automatically |
140 |
(use-package auto-package-update |
141 |
:config |
142 |
(setq auto-package-update-delete-old-versions t) |
143 |
(setq auto-package-update-hide-results t) |
144 |
(auto-package-update-maybe)) |
145 |
|
146 |
;; UI settings |
147 |
(tool-bar-mode -1) |
148 |
(menu-bar-mode -1) |
149 |
(toggle-scroll-bar -1) |
150 |
|
151 |
;; Tabs and width |
152 |
(setq-default tab-width 4) |
153 |
(setq-default c-basic-offset 4) |
154 |
|
155 |
(use-package spaceline |
156 |
:init |
157 |
(setq frame-char-height 35) |
158 |
(setq powerline-height 35) |
159 |
:custom |
160 |
(spaceline-toggle-buffer-size-off) |
161 |
;(setq powerline-height 21) |
162 |
(spaceline-inflation 1) |
163 |
(powerline-default-separator 'slant) |
164 |
:config |
165 |
(spaceline-spacemacs-theme) |
166 |
(setq spaceline-highlight-face-func 'spaceline-highlight-face-evil-state)) |
167 |
|
168 |
|
169 |
(use-package monokai-theme |
170 |
:config |
171 |
(load-theme 'monokai) |
172 |
(setq monokai-variable-pitch-mode t)) |
173 |
;; When using solarized as theme, put in :config |
174 |
;; (setq x-underline-at-descent-line t) |
175 |
;; Which will block an ugly line being drawn trhough the modeline. |
176 |
|
177 |
;(add-hook 'org-mode-hook '(lambda () (setq fill-column 80))) |
178 |
;(add-hook 'org-mode-hook 'auto-fill-mode) |
179 |
;; (Programming) languages |
180 |
|
181 |
|
182 |
|
183 |
(use-package dante |
184 |
:after haskell-mode |
185 |
:commands 'dante-mode |
186 |
:init |
187 |
(add-hook 'haskell-mode-hook 'dante-mode) |
188 |
(add-hook 'haskell-mode-hook 'flycheck-mode)) |
189 |
|
190 |
|
191 |
;; HTML/CSS/Django |
192 |
(use-package web-mode |
193 |
:mode "\\.html?\\.djhtml\\'" |
194 |
:init |
195 |
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode)) |
196 |
(setq web-mode-markup-indent-offset 4) |
197 |
(setq web-mode-css-indent-offset 4) |
198 |
(setq web-mode-code-indent-offset 4) |
199 |
;(setq web-mode-engines-alist |
200 |
; '(("django" . "\\.html\\"))) ;; FIXME this doesn't work yet. IDK why. |
201 |
:custom ;; Next lines disable all the automatic completion stuff that I didn't explicitely ask for |
202 |
(web-mode-enable-auto-pairing nil) |
203 |
(web-mode-enable-auto-closing nil) |
204 |
(web-mode-enable-auto-expanding nil) |
205 |
(web-mode-enable-auto-opening nil) |
206 |
(web-mode-enable-auto-quoting nil)) |
207 |
|
208 |
|
209 |
;;(use-package ycmd-mode |
210 |
;;:ensure ycmd |
211 |
;;;:hook (after-init . global-ycmd-mode) |
212 |
;;:hook (haskell-mode elisp-mode python-mode c-mode c++-mode) ; Add the modes of the languages where YCM |
213 |
;;; needs to kick in |
214 |
;;:init |
215 |
;;; Old paths |
216 |
;;;(set-variable 'ycmd-server-command `("/usr/bin/python" ,(file-truename "/usr/share/vim/vimfiles/third_party/ycmd/ycmd/"))) |
217 |
;;;(set-variable 'ycmd-global-config "/home/simba/.emacs.d/lang/ycm_conf.py") |
218 |
;;(set-variable 'ycmd-server-command `("python" ,(file-truename "~/ycmd/ycmd"))) |
219 |
;;(set-variable 'ycmd-global-config (file-truename "~/Repositories/rc/.ycm_extra_conf.py")) |
220 |
;;(set-variable 'ycmd-global-modes 'all) ; Activates YCMD in 'all' major modes, |
221 |
;;; not only those in ycmd-file-type-map |
222 |
;;;(set-variable 'ycmd-extra-conf-whitelist '("/home/jorrit/Dev/*")) |
223 |
;;:config |
224 |
;;(setq url-show-status nil) ; Makes those FUCKING annoying messages SHUT THE HELL UP |
225 |
;;(setq request-message-level -1) |
226 |
|
227 |
;;(use-package flycheck-ycmd |
228 |
;;:ensure t |
229 |
;;:commands (flycheck-ycmd-setup) |
230 |
;;:hook (ycmd-mode . flycheck-ycmd-setup) |
231 |
;;:init |
232 |
;;(setq flycheck-clang-language-standard "c++11") |
233 |
;;(when (not (display-graphic-p)) |
234 |
;;(setq flycheck-indication-mode nil)))) |
235 |
|
236 |
(use-package company |
237 |
:hook (after-init . global-company-mode) |
238 |
:init |
239 |
(company-tng-configure-default) ; Use <TAB> to scroll in completion options |
240 |
(setq company-minimum-prefix-length 2) |
241 |
(setq company-idle-delay 0.0)) |
242 |
;:config |
243 |
;;(use-package company-ycmd-mode |
244 |
;;:ensure company-ycmd |
245 |
;;:commands (company-ycmd-setup) |
246 |
;;:hook (ycmd-mode . company-ycmd-setup)) |
247 |
;;(use-package company-flx |
248 |
;;:ensure t |
249 |
;;:config |
250 |
;;(company-flx-mode +1))) |
251 |
;; |
252 |
(use-package company-fuzzy |
253 |
:hook (company-mode . company-fuzzy-mode) |
254 |
:init |
255 |
(setq company-fuzzy-sorting-backend 'flx |
256 |
company-fuzzy-prefix-on-top nil |
257 |
company-fuzzy-history-backends '(company-yasnippet) |
258 |
company-fuzzy-trigger-symbols '("." "->" "<" "\"" "'" "@"))) |
259 |
|
260 |
(global-company-fuzzy-mode 1) |
261 |
|
262 |
(use-package clang-format |
263 |
:general |
264 |
(local-leader-def |
265 |
:states 'normal |
266 |
:modes '(c-mode-map c++-mode-map) |
267 |
"b" '(:ignore t :which-key "clang") |
268 |
"bf" 'clang-format-buffer) |
269 |
:init |
270 |
(setq-default clang-format-style "{BasedOnStyle: llvm, IndentWidth: 4}")) |
271 |
|
272 |
;; eViL-mode |
273 |
(use-package evil |
274 |
:hook (after-init . evil-mode) |
275 |
:bind (:map evil-normal-state-map ;; Scrolls over lines correctly |
276 |
("j" . evil-next-visual-line) |
277 |
("k" . evil-previous-visual-line)) |
278 |
:general |
279 |
(my-leader-def |
280 |
:states 'normal |
281 |
"b" '(:ignore t :which-key "buffer") |
282 |
"g" '(:ignore t :which-key "magit") |
283 |
"f" '(:ignore t :which-key "files") |
284 |
"bk" 'kill-this-buffer |
285 |
"bd" 'kill-other-buffers |
286 |
"bh" 'switch-to-home-buffer |
287 |
"br" 'revert-buffer |
288 |
"h" 'split-window-vertically |
289 |
"v" 'split-window-horizontally) |
290 |
(local-leader-def |
291 |
:states 'normal |
292 |
;; General lang options |
293 |
"c" 'compile) |
294 |
:init |
295 |
(setq evil-find-skip-newlines t) ;; Allows f/F/t/T to search beyond CR/LF |
296 |
(setq evil-set-undo-system 'undo-tree) ;; Sets EViL up to use undo (after a |
297 |
;; weird 2020 patch) |
298 |
(setq evil-want-C-u-scroll t)) ;; Activates c-u scroll to above. |
299 |
|
300 |
;; About smooth-scrolling: I'd normally just use some variables for scrolling |
301 |
;; but they all fail with org-mode. This package fixes everything that's wrong for me. |
302 |
(use-package smooth-scrolling |
303 |
:config |
304 |
(smooth-scrolling-mode 1)) |
305 |
|
306 |
(use-package org |
307 |
:pin "org" |
308 |
; FIXME This causes some errors with bind-keys or what have you. Commented |
309 |
; until it is fixed. |
310 |
;:bind (:bind-keymap |
311 |
; ("C-c x" . org-todo-state-map) |
312 |
; :map org-todo-state-map |
313 |
; ("x" . #'(lambda nil (interactive) (org-todo "CANCELLED"))) |
314 |
; ("d" . #'(lambda nil (interactive) (org-todo "DONE"))) |
315 |
; ("f" . #'(lambda nil (interactive) (org-todo "DEFERRED"))) |
316 |
; ("l" . #'(lambda nil (interactive) (org-todo "DELEGATED"))) |
317 |
; ("s" . #'(lambda nil (interactive) (org-todo "STARTED"))) |
318 |
; ("w" . #'(lambda nil (interactive) (org-todo "WAITING")))) |
319 |
; :map org-mode-map |
320 |
; ("C-c x" . org-todo-state-map)) |
321 |
:init |
322 |
(define-key mode-specific-map [?a] 'org-agenda) |
323 |
:custom |
324 |
;; Because I use XeLaTeX (it's objectively better), some variables need to be |
325 |
;; set so org-mode knows what to call. |
326 |
|
327 |
;; Okay, so you cán export asynchronous so compiling your PDF doesn't lock up |
328 |
;; the editor completely, but for one reason or another, you MUST set the |
329 |
;; async-debug to nil. Otherwise it will constantly "exit abnormally" without |
330 |
;; reason. This fixes it, who knows why. |
331 |
(org-export-async-debug nil) |
332 |
|
333 |
(org-latex-compiler 'xelatex) ; Makes sure the XeLaTeX compiler is used |
334 |
|
335 |
; Tells Org to use dvisvgm because dvipng does not support XeLaTeX's output format |
336 |
(org-preview-latex-default-process 'dvisvgm) |
337 |
|
338 |
; This edits the preview process so it works correctly with XeLaTeX. |
339 |
; Changes: |
340 |
; - "latex" to "xelatex" |
341 |
; - Added the "-no-pdf" flag so it prints an XDV file instead of PDF. |
342 |
; - change input type from dvi to xdv |
343 |
; - Only leave the dvisvgm option because I don't need the others |
344 |
(org-preview-latex-process-alist |
345 |
(quote |
346 |
((dvisvgm :programs |
347 |
("xelatex" "dvisvgm") |
348 |
:description "dvi > svg" :message "you need to install the programs: xelatex and dvisvgm." :use-xcolor t :image-input-type "xdv" :image-output-type "svg" :image-size-adjust |
349 |
(1.7 . 1.5) |
350 |
:latex-compiler |
351 |
("xelatex -interaction nonstopmode -no-pdf -output-directory %o %f") |
352 |
:image-converter |
353 |
("dvisvgm %f -n -b min -c %S -o %O"))))) |
354 |
|
355 |
;; Sets the formatting options. I only changed :scale to 1.6, but I don't know |
356 |
;; how to change only thát, so for now I'm configuring the entire variable |
357 |
(org-format-latex-options (quote |
358 |
(:foreground default :background default :scale 1.6 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers |
359 |
("begin" "$1" "$" "$$" "\\(" "\\[")))) |
360 |
|
361 |
;; Sets the directory in which the preview fragments are stored to the /tmp |
362 |
;; folder. Otherwise it clutters up the folder in which the source resides |
363 |
;; with what are essentially cache files. |
364 |
(org-preview-latex-image-directory "/tmp/ltximg/") |
365 |
|
366 |
;; Following customizations are in regard to org-agenda configuration. |
367 |
(org-agenda-files (quote ("~/shared/planning/planning.org"))) |
368 |
(org-default-notes-file "~/shared/planning/notes.org") |
369 |
(org-agenda-span 62) |
370 |
(org-deadline-warning-days 14) |
371 |
(org-agenda-show-all-dates t) |
372 |
(org-agenda-skip-deadline-if-done t) |
373 |
(org-agenda-skip-scheduled-if-done t) |
374 |
(org-agenda-start-on-weekday nil) |
375 |
(org-reverse-note-order t) |
376 |
(org-fast-tag-selection-single-key (quote expert)) |
377 |
(org-agenda-custom-commands |
378 |
(quote (("d" todo "DELEGATED" nil) |
379 |
("c" todo "DONE|DEFERRED|CANCELED" nil) |
380 |
("w" todo "WAITING" nil) |
381 |
("W" agenda "" ((org-agenda-ndays 21))) |
382 |
("A" agenda "" |
383 |
((org-agenda-skip-function |
384 |
(lambda nil |
385 |
(org-agenda-skip-entry-if (quote notregexp) "\\=.*\\[#A\\]"))) |
386 |
(org-agenda-ndays 1) |
387 |
(org-agenda-overriding-header "Today's Priority #A tasks: "))) |
388 |
("u" alltodo "" |
389 |
((org-agenda-skip-function |
390 |
(lambda nil |
391 |
(org-agenda-skip-entry-if (quote scheduled) (quote deadline) |
392 |
(quote regexp) "\n]+>"))) |
393 |
(org-agenda-overriding-header "Unscheduled TODO entries: ")))))) |
394 |
(org-capture-store-without-prompt t) |
395 |
(org-capture-templates |
396 |
(quote ((116 "* TODO %?\n %u" "~/Repositories/private/org/planning.org" "Tasks") |
397 |
(110 "* %u %?" "~/Repositories/private/org/notes.org" "Notes")))) |
398 |
(capture-annotation-functions (quote (org-capture-annotation))) |
399 |
(capture-handler-functions (quote (org-capture-handler)))) |
400 |
|
401 |
;:general |
402 |
;(local-leader-def |
403 |
; :states 'normal |
404 |
; :keymaps 'org-mode-map |
405 |
; "e" 'org-export-dispatch |
406 |
; "x" 'org-table-export |
407 |
; "." 'org-time-stamp |
408 |
; "t" 'org-twbs-export-to-html |
409 |
; "s" 'org-schedule |
410 |
; "d" 'org-deadline |
411 |
; "'" 'org-edit-special) |
412 |
; :config |
413 |
; ;; log todo items with timestamp |
414 |
; (setq org-log-done 'time)) |
415 |
|
416 |
(use-package helm |
417 |
:hook (after-init . helm-mode) |
418 |
:commands (helm-autoresize-mode) |
419 |
:init |
420 |
;; (defvar helm-google-suggest-use-curl-p) |
421 |
(defvar helm-ff-search-library-in-sexp) |
422 |
(defvar helm-echo-input-in-header-line) |
423 |
(defvar helm-ff-file-name-history-use-recentf) |
424 |
:general |
425 |
(general-define-key |
426 |
"M-x" 'helm-M-x |
427 |
"M-:" 'helm-eval-expression |
428 |
"C-c h" 'helm-command-prefix) |
429 |
(general-define-key |
430 |
:keymaps 'helm-map |
431 |
"<tab>" 'helm-execute-persistent-action |
432 |
"C-i" 'helm-execute-persistent-action |
433 |
"C-z" 'helm-select-action) |
434 |
(my-leader-def |
435 |
:states 'normal |
436 |
"bb" 'helm-buffers-list |
437 |
"ff" 'helm-find-files |
438 |
"p" 'helm-show-kill-ring) |
439 |
:config |
440 |
(setq helm-split-window-inside-p t ; open helm buffer inside current window, not occupy whole other window |
441 |
helm-move-to-line-cycle-in-source t ; move to end or beginning of source when reaching top or bottom of source. |
442 |
helm-ff-search-library-in-sexp t ; search for library in `require' and `declare-function' sexp. |
443 |
helm-scroll-amount 8 ; scroll 8 lines other window using m-<next>/m-<prior> |
444 |
helm-ff-file-name-history-use-recentf t |
445 |
helm-echo-input-in-header-line t) |
446 |
|
447 |
;; hide some autogenerated files from helm |
448 |
(setq helm-ff-skip-boring-files t) |
449 |
;; (add-to-list 'helm-boring-file-regexp-list "\\~$") |
450 |
|
451 |
(setq helm-autoresize-max-height 0) |
452 |
(setq helm-autoresize-min-height 20) |
453 |
(helm-autoresize-mode 1)) |
454 |
|
455 |
|
456 |
(use-package rainbow-delimiters |
457 |
:hook (prog-mode . rainbow-delimiters-mode)) |
458 |
|
459 |
|
460 |
;; Settings for having an LaTeX beamer class export tool |
461 |
(unless (boundp 'org-export-latex-classes) |
462 |
(setq org-export-latex-classes nil)) |
463 |
(add-to-list 'org-export-latex-classes |
464 |
;; beamer class, for presentations |
465 |
'("beamer" |
466 |
"\\documentclass[11pt]{beamer}\n |
467 |
\\mode<{{{beamermode}}}>\n |
468 |
\\usetheme{{{{beamertheme}}}}\n |
469 |
\\usecolortheme{{{{beamercolortheme}}}}\n |
470 |
\\beamertemplateballitem\n |
471 |
\\setbeameroption{show notes} |
472 |
\\usepackage[utf8]{inputenc}\n |
473 |
\\usepackage[T1]{fontenc}\n |
474 |
\\usepackage{hyperref}\n |
475 |
\\usepackage{color} |
476 |
\\usepackage{listings} |
477 |
\\lstset{numbers=none,language=[ISO]C++,tabsize=4, |
478 |
frame=single, |
479 |
basicstyle=\\small, |
480 |
showspaces=false,showstringspaces=false, |
481 |
showtabs=false, |
482 |
keywordstyle=\\color{blue}\\bfseries, |
483 |
commentstyle=\\color{red}, |
484 |
}\n |
485 |
\\usepackage{verbatim}\n |
486 |
\\institute{{{{beamerinstitute}}}}\n |
487 |
\\subject{{{{beamersubject}}}}\n" |
488 |
|
489 |
("\\section{%s}" . "\\section*{%s}") |
490 |
|
491 |
("\\begin{frame}[fragile]\\frametitle{%s}" |
492 |
"\\end{frame}" |
493 |
"\\begin{frame}[fragile]\\frametitle{%s}" |
494 |
"\\end{frame}"))) |
495 |
|
496 |
;; Adds a letter class, for formal letters |
497 |
|
498 |
(add-to-list 'org-export-latex-classes |
499 |
|
500 |
'("letter" |
501 |
"\\documentclass[11pt]{letter}\n |
502 |
\\usepackage[utf8]{inputenc}\n |
503 |
\\usepackage[T1]{fontenc}\n |
504 |
\\usepackage{color}" |
505 |
|
506 |
("\\section{%s}" . "\\section*{%s}") |
507 |
("\\subsection{%s}" . "\\subsection*{%s}") |
508 |
("\\subsubsection{%s}" . "\\subsubsection*{%s}") |
509 |
("\\paragraph{%s}" . "\\paragraph*{%s}") |
510 |
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) |
511 |
|
512 |
|
513 |
(custom-set-faces |
514 |
;; custom-set-faces was added by Custom. |
515 |
;; If you edit it by hand, you could mess it up, so be careful. |
516 |
;; Your init file should contain only one such instance. |
517 |
;; If there is more than one, they won't work right. |
518 |
) |
519 |