-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
109 lines (94 loc) · 3.93 KB
/
init.el
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
;; ==============================
;; MELPA Package support
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
;; ==============================
;; Manage load path
(add-to-list 'load-path "~/.emacs.d/xtofadditional/")
(require 'org-bullets)
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
(require 'org-install)
(require 'org-capture)
;; ==============================
;; Initialise Package System
(package-initialize)
;; ==============================
;; If there are no archived package contents, refresh them
(when (not package-archive-contents)
(package-refresh-contents))
;; ==============================
;; Installs packages
;; myPackages contains a list of package names
(defvar myPackages
'(elpy ;; emacs Lisp Python Environment
flycheck ;; on the fly syntax checking
py-autopep8 ;; Run autopep8 on save
)
)
;; Scans the list in myPackages
;; If the package listed is not already installed, install it
(mapc #'(lambda (package)
(unless (package-installed-p package)
(package-install package)))
myPackages)
(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.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(ansi-color-names-vector
["#2d3743" "#ff4242" "#74af68" "#dbdb95" "#34cae2" "#008b8b" "#00ede1" "#e1e1e0"])
'(custom-safe-themes
(quote
("55c2c0d811cdecd311ebe27f82b24a5410d38c1ff6117c91e5ba88031829ee06" "fa3bdd59ea708164e7821574822ab82a3c51e262d419df941f26d64d015c90ee" "845103fcb9b091b0958171653a4413ccfad35552bc39697d448941bcbe5a660d" "d74c5485d42ca4b7f3092e50db687600d0e16006d8fa335c69cf4f379dbd0eee" "be9645aaa8c11f76a10bcf36aaf83f54f4587ced1b9b679b55639c87404e2499" "76c5b2592c62f6b48923c00f97f74bcb7ddb741618283bdb2be35f3c0e1030e3" default)))
'(display-time-mode t)
'(org-agenda-files (quote ("~/onedrive/OrgMode")))
'(package-selected-packages
(quote
(auto-complete exec-path-from-shell go-mode org-bullets htmlize)))
'(show-paren-mode 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 "Liberation Mono" :foundry "outline" :slant normal :weight normal :height 102 :width normal)))))
;; ==============================
;; Basic Customization
;; ==============================
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(desktop-save-mode 1)
(display-time-mode 1)
(visual-line-mode 1) ;;to do soft line break
(ido-mode 1)
(setq visible-bell 1) ;;to stop annoying default sound
(setq backup-directory-alist '(("." . "~/.emacs.d/.saves"))) ;;collecting all backups files into one directory
;; ==============================
;; OrgMode Customization
;; ==============================
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(global-set-key "\C-cc" 'org-capture)
(setq org-hide-emphasis-markers t) ;;hide markup
(font-lock-add-keywords 'org-mode
'(("^ *\\([-]\\) "
(0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))
;; ==============================
;; Dev Environment Setup
;; ==============================
(elpy-enable) ;;enabling elpy Python package
;; Enable Flycheck
(when (require 'flycheck nil t)
(setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
(add-hook 'elpy-mode-hook 'flycheck-mode))
;; Enable autopep8
(require 'py-autopep8)
(add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save)
;; Making tabulation / indentation 4 spaces instead of 2
(setq tab-width 4)