-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
142 lines (127 loc) · 5.48 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
(setq gc-cons-threshold 100000000)
(setq inhibit-startup-message t)
(defalias 'yes-or-no-p 'y-or-n-p)
(defconst demo-packages
'(anzu
anaconda-mode
bliss-theme
clean-aindent-mode
comment-dwim-2
company
;; company-anaconda
company-c-headers
dtrt-indent
duplicate-thing
function-args
gnuplot-mode
helm
helm-projectile
helm-swoop
iedit
jedi
langtool
projectile
smartparens
sml-mode
sr-speedbar
undo-tree
volatile-highlights
ws-butler
yasnippet
zenburn-theme
zygospore))
(defun install-packages ()
"Install all required packages."
(interactive)
(unless package-archive-contents
(package-refresh-contents))
(dolist (package demo-packages)
(unless (package-installed-p package)
(package-install package))))
(install-packages)
;; backup files
;; disable backup files
;(setq make-backup-files nil)
;; move backup files into dir ~/.emacs.d/backup
(setq backup-directory-alist '(("." . "~/.emacs.d/backup"))
backup-by-copying t ; Don't delink hardlinks
version-control t ; Use version numbers on backups
delete-old-versions t ; Automatically delete excess backups
kept-new-versions 20 ; how many of the newest versions to keep
kept-old-versions 5 ; and how many of the old
)
;; set frame height
(if (window-system) (set-frame-height (selected-frame) 35))
;; hide tool/menu/scroll bars
;; display line number
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
;; (global-linum-mode t)
;(setq column-number-mode nil)
;; global fill columns
(setq-default fill-column 75)
(add-hook 'org-mode-hook 'turn-on-auto-fill)
(global-auto-revert-mode t)
;; chinese font
(set-fontset-font t 'han (font-spec :family "Microsoft Yahei" :size 16))
(add-to-list 'load-path "~/.emacs.d/custom")
;; this variables must be set before load helm-gtags
;; you can change to any prefix key of your choice
;; (setq helm-gtags-prefix-key "\C-cg")
(require 'setup-helm)
(require 'setup-editing)
(require 'setup-projectitle)
(require 'setup-latex)
(require 'setup-cpp)
(require 'setup-python)
(require 'setup-org-export-latex) ; org-mode export latex pdf
(require 'setup-org-octopress)
(require 'setup-sr-speedbar)
(require 'setup-gnuplot)
(require 'setup-js-css)
(require 'setup-langtool)
(windmove-default-keybindings)
(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.
'(tab-stop-list (quote (4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120)))
'(ansi-color-names-vector ["#212526" "#ff4b4b" "#b4fa70" "#fce94f" "#729fcf" "#ad7fa8" "#8cc4ff" "#eeeeec"])
'(compilation-message-face (quote default))
'(cua-global-mark-cursor-color "#2aa198")
'(cua-normal-cursor-color "#839496")
'(cua-overwrite-cursor-color "#b58900")
'(cua-read-only-cursor-color "#859900")
'(custom-enabled-themes (quote (bliss)))
'(custom-safe-themes (quote ("569dc84822fc0ac6025f50df56eeee0843bffdeceff2c1f1d3b87d4f7d9fa661" "9dae95cdbed1505d45322ef8b5aa90ccb6cb59e0ff26fef0b8f411dfc416c552" "72407995e2f9932fda3347e44e8c3f29879c5ed88da71f06ba4887b0596959a4" "0f002f8b472e1a185dfee9e5e5299d3a8927b26b20340f10a8b48beb42b55102" "d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" "3164a65923ef23e0f3dff9f9607b4da1e07ef1c3888d0f6878feef6c28357732" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" default)))
'(fci-rule-color "#383838")
'(highlight-changes-colors (quote ("#d33682" "#6c71c4")))
'(highlight-symbol-colors (--map (solarized-color-blend it "#002b36" 0.25) (quote ("#b58900" "#2aa198" "#dc322f" "#6c71c4" "#859900" "#cb4b16" "#268bd2"))))
'(highlight-symbol-foreground-color "#93a1a1")
'(highlight-tail-colors (quote (("#073642" . 0) ("#546E00" . 20) ("#00736F" . 30) ("#00629D" . 50) ("#7B6000" . 60) ("#8B2C02" . 70) ("#93115C" . 85) ("#073642" . 100))))
'(hl-bg-colors (quote ("#7B6000" "#8B2C02" "#990A1B" "#93115C" "#3F4D91" "#00629D" "#00736F" "#546E00")))
'(hl-fg-colors (quote ("#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36")))
'(magit-diff-use-overlays nil)
'(pos-tip-background-color "#073642")
'(pos-tip-foreground-color "#93a1a1")
'(smartrep-mode-line-active-bg (solarized-color-blend "#859900" "#073642" 0.2))
'(sr-speedbar-default-width 30)
'(sr-speedbar-right-side nil)
'(term-default-bg-color "#002b36")
'(term-default-fg-color "#839496")
'(vc-annotate-background nil)
'(vc-annotate-color-map (quote ((20 . "#dc322f") (40 . "#c85d17") (60 . "#be730b") (80 . "#b58900") (100 . "#a58e00") (120 . "#9d9100") (140 . "#959300") (160 . "#8d9600") (180 . "#859900") (200 . "#669b32") (220 . "#579d4c") (240 . "#489e65") (260 . "#399f7e") (280 . "#2aa198") (300 . "#2898af") (320 . "#2793ba") (340 . "#268fc6") (360 . "#268bd2"))))
'(vc-annotate-very-old-color nil)
'(weechat-color-list (quote (unspecified "#002b36" "#073642" "#990A1B" "#dc322f" "#546E00" "#859900" "#7B6000" "#b58900" "#00629D" "#268bd2" "#93115C" "#d33682" "#00736F" "#2aa198" "#839496" "#657b83"))))
(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.
)