-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.emacs
95 lines (78 loc) · 3.23 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
(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
["#2e3436" "#a40000" "#4e9a06" "#c4a000" "#204a87" "#5c3566" "#729fcf" "#eeeeec"])
'(column-number-mode t)
'(custom-enabled-themes (quote (wheatgrass)))
'(inhibit-startup-screen t)
'(package-selected-packages (quote (flymake-json yaml-mode kivy-mode emojify elpy)))
'(python-shell-interpreter "python3")
'(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 "DAMA" :slant normal :weight normal :height 165 :width normal)))))
;; ==================== Backup Settings ==================== ;;
(setq backup-directory-alist `(("." . "~/.saves")))
;; ==================== UI settings ==================== ;;
(add-to-list 'default-frame-alist '(fullscreen . maximized))
(menu-bar-mode 0)
(tool-bar-mode 0)
(global-linum-mode 1)
(toggle-scroll-bar 0)
;; ==================== Mode settings ==================== ;;
(setq auto-mode-alist
;; for scons
(cons '("SCons" . python-mode) auto-mode-alist))
;; ==================== Elpy configuration ==================== ;;
(require 'package)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
(add-to-list 'package-archives
'("elpy" . "https://jorgenschaefer.github.io/packages/"))
(package-initialize)
(elpy-enable)
(setq elpy-rpc-python-command "python3")
;; ==================== Enable recent file mode ==================== ;;
(require 'recentf)
(recentf-mode 1)
;; ==================== Custom Funtions ==================== ;;
;; (defun text-indent-mode ()
;; ;;(setq-default indent-tabs-mode nil)
;; (setq-default tab-width 4)
;; (setq indent-line-function 'insert-tab))
(add-hook 'comint-mode-hook
(defun rm-comint-postoutput-scroll-to-bottom ()
(remove-hook 'comint-output-filter-functions
'comint-postoutput-scroll-to-bottom)))
(setq-default c-basic-offset 8)
;; ==================== Hooks ==================== ;;
;; (add-hook 'text-mode-hook '(lambda ()
;; (local-set-key (kbd "RET") 'electric-newline-and-maybe-indent)))
;; (add-hook 'prog-mode-hook 'linum-mode)
;; (add-hook 'text-mode-hook 'linum-mode)
(add-hook 'prog-mode-hook 'show-paren-mode)
(add-hook 'js-mode-hook 'flymake-json-maybe-load)
(add-hook 'prog-mode-hook 'electric-pair-mode)
(add-hook 'after-init-hook 'global-emojify-mode)
(add-hook 'prog-mode-hook 'hs-minor-mode)
;; ==================== Key bindings ==================== ;;
(global-set-key
(kbd "C-c C-f") 'recentf-open-files)
(global-set-key
(kbd "C-c c") 'comment-region)
(global-set-key
(kbd "C-c u") 'uncomment-region)
(global-set-key
(kbd "C-c k") (kbd "C-u 0 C-k"))
(global-set-key
(kbd "C-c h") 'hs-hide-block)
(global-set-key
(kbd "C-c s") 'hs-show-block)