-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.emacs
93 lines (73 loc) · 2.78 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
; https://blog.aaronbieber.com/2015/05/24/from-vim-to-emacs-in-fourteen-days.html
(require 'package)
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/"))
(setq package-enable-at-startup nil)
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(eval-when-compile
(require 'use-package))
; https://github.com/emacs-helm/helm
(use-package helm
:ensure t)
(require 'helm-config)
(global-set-key (kbd "M-x") 'helm-M-x)
(global-set-key (kbd "C-x C-f") 'helm-find-files)
(helm-mode 1)
; Hide scroll bar
; https://www.emacswiki.org/emacs/ScrollBar
(scroll-bar-mode -1)
; Hide tool bar
; https://www.emacswiki.org/emacs/ToolBar#toc1
(tool-bar-mode -1)
; https://github.com/oneKelvinSmith/monokai-emacs
(use-package monokai-theme
:ensure t)
(load-theme 'monokai t)
; Show line numbers
; http://superuser.com/a/212669
; https://www.emacswiki.org/emacs/LineNumbers
(global-linum-mode t)
; http://orgmode.org/
(use-package org
:ensure t)
; https://tex.stackexchange.com/questions/364914/using-koma-script-article-with-org-mode/364982
(with-eval-after-load "ox-latex"
(add-to-list 'org-latex-classes
'("koma-article" "\\documentclass{scrartcl}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))
; Let the default latex header (which contains several exports) be empty
; http://orgmode.org/manual/Header-and-sectioning.html
(with-eval-after-load "ox-latex"
(setq org-latex-default-packages-alist '()))
; Use booktabs for tables
(custom-set-variables
'(org-latex-tables-booktabs t))
; https://github.com/bbatsov/projectile
(use-package projectile
:ensure t)
; https://github.com/bbatsov/helm-projectile
(use-package helm-projectile
:ensure t)
(projectile-mode)
; https://www.emacswiki.org/emacs/SetFonts
(set-face-attribute 'default t :font "Source Code Pro-10")
; https://github.com/emacs-evil/evil
; put Evil at the end to let it detect other packages it might have
; keybindings for
; see https://nathantypanski.com/blog/2014-08-03-a-vim-like-emacs-config.html
(use-package evil
:ensure t)
(require 'evil)
(evil-mode 1)
; turn on auto-fill-mode (automatically hard wrap text)
; https://www.gnu.org/software/emacs/manual/html_node/emacs/Auto-Fill.html
; https://www.gnu.org/software/emacs/manual/html_node/efaq/Turning-on-auto_002dfill-by-default.html
(add-hook 'text-mode-hook 'turn-on-auto-fill)