-
Notifications
You must be signed in to change notification settings - Fork 0
/
etc.el
49 lines (38 loc) · 1.17 KB
/
etc.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
;;; various options
;;; frame appearance
(when (window-system)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(setq initial-frame-alist '((fullscreen . maximized))))
(menu-bar-mode -1)
(setq inhibit-startup-screen +1)
(load-theme 'monokai t)
(add-hook 'window-size-change-functions #'my/adjust-font-size)
;;; scroll
(setq redisplay-dont-pause t
scroll-margin 1
scroll-step 1
scroll-conservatively 10000
scroll-preserve-screen-position 1
mouse-wheel-follow-mouse 't
mouse-wheel-scroll-amount '(1 ((shift) . 1)))
;;; backup
(setq make-backup-files nil)
;; autosave
(setq auto-save-default nil)
;;; allow narrow-to-region
(put 'narrow-to-region 'disabled nil)
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)
;;; other minor modes
(global-hl-line-mode +1)
(global-display-line-numbers-mode)
(column-number-mode +1)
(setq uniquify-buffer-name-style 'forward)
(show-paren-mode +1)
;; indent java
(add-hook 'java-mode-hook (lambda () (c-set-offset 'arglist-intro '++)))
;; do not add coding line in ruby files
(setq ruby-insert-encoding-magic-comment nil)
;; use ruby-end mode
(add-hook 'ruby-mode-hook (lambda () (ruby-end-mode 1)))