-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemacs
More file actions
107 lines (94 loc) · 3.82 KB
/
emacs
File metadata and controls
107 lines (94 loc) · 3.82 KB
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
;; General settings
(setq make-backup-files nil)
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(global-visual-line-mode)
(setq auto-mode-alist (cons '( "\\.m" . octave-mode) auto-mode-alist ) )
(setq auto-mode-alist (cons '( "\\.less" . css-mode) auto-mode-alist ) )
;; Packages: MELPA stable
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)
;; Load Tango color theme theme
(load-theme 'tangotango t)
;; PHP
(autoload 'php-mode "php-mode" "Major mode for editing php code." t)
(add-to-list 'auto-mode-alist '("\\.php$" . php-mode))
(add-to-list 'auto-mode-alist '("\\.inc$" . php-mode))
;; OCaml
(setq auto-mode-alist (cons '("\\.ml[iylp]?\\'" . tuareg-mode) auto-mode-alist))
(autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code" t)
(autoload 'ocamldebug "ocamldebug" "Run the Caml debugger" t)
;; YASnippet
(add-to-list 'load-path "~/.emacs.d/elpa/yasnippet-0.11.0/")
;; (add-to-list 'yas-snippet-dirs "~/.emacs.d/elpa/yasnippet-0.11.0/yasnippet-snippets/")
(require 'yasnippet)
(yas-global-mode t)
;; LaTeX
(add-to-list 'load-path "~/.emacs.d/magic-latex-buffer/")
(require 'tex-mode)
(require 'magic-latex-buffer)
(add-hook 'latex-mode-hook 'magic-latex-buffer 'flyspell-mode)
(add-hook 'LaTeX-mode-hook 'magic-latex-buffer 'flyspell-mode)
;; (load "auctex.el" nil t t)
;; (load "preview-latex.el" nil t t)
(add-hook 'LaTeX-mode-hook
'(lambda ()
(TeX-add-symbols '("eqref" TeX-arg-ref (ignore)))))
;; Vala Mode
(autoload 'vala-mode "vala-mode" "Major mode for editing Vala code." t)
(add-to-list 'auto-mode-alist '("\.vala$" . vala-mode))
(add-to-list 'auto-mode-alist '("\.vapi$" . vala-mode))
(add-to-list 'file-coding-system-alist '("\.vala$" . utf-8))
(add-to-list 'file-coding-system-alist '("\.vapi$" . utf-8))
;; Markdown-mode
(autoload 'markdown-mode "markdown-mode" "Major mode for editing markdown." t)
(add-to-list 'auto-mode-alist '("\\.md$" . markdown-mode))
; Macro to load somethings
(defun load-diary ()
(interactive)
(desktop-change-dir "~/git/diary")
(desktop-save-mode 1)
)
(defun load-Web ()
(interactive)
(desktop-change-dir "~/Web/public_hugo")
(desktop-save-mode 1)
)
(defun load-BrR2 ()
(interactive)
(desktop-change-dir "~/Desktop/BrR2")
(desktop-save-mode 1)
)
;; hook on after-make-frame-functions
(add-hook 'after-make-frame-functions 'test-win-sys)
(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.
'(inhibit-startup-screen t)
'(package-selected-packages
'(obsidian dictionary org-roam-ui org-roam bibretrieve markdown-mode magit yasnippet auctex)))
(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.
)
;; tell ispell to skip \eqref,\label and \cref first madatory argument
(let ((head (car ispell-tex-skip-alists))
(tail (cadr ispell-tex-skip-alists)))
(setq head (append '(("\\\\label" ispell-tex-arg-end 1))
head))
(setq head (append '(("\\\\eqref" ispell-tex-arg-end 1))
head))
(setq head (append '(("\\\\cref" ispell-tex-arg-end 1))
head))
;; (setq tail (append '(("myverbatim" . "\\\\end{myverbatim}"))
;; tail))
(setq ispell-tex-skip-alists (list head tail)))