blob: 53517313c536a3e823576943edd367bfe0b942e1 (
plain) (
blame)
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
|
(setq custom-file "~/.emacs.d/emacs-custom.el")
(load-file custom-file)
;; -- utils ---------------------------------------------------------------------
(defun install-once (pkg)
(unless (package-installed-p pkg)
(package-install pkg)))
;; -- emacs ---------------------------------------------------------------------
;; disable menu bar
(menu-bar-mode 0)
;; disable tool bar
(tool-bar-mode 0)
;; disable scroll bar
(scroll-bar-mode 0)
;; windows focus follow mouse (>0 means sec delay before focus)
(setq mouse-autoselect-window 0)
;; disable indenting with TABs
(setq-default indent-tabs-mode nil)
;; line numbers
;(setq display-line-numbers-type 'relative)
;(display-line-numbers-mode 0)
;; place backup of all files in single directory
(setq backup-directory-alist '(("." . "~/.emacs.d/backup")))
;; whitespace style (when whitespace-mode is enabled)
(setq whitespace-style '(face trailing tabs lines tab-mark))
;; -- isearch -------------------------------------------------------------------
;; show number of matches
(setq isearch-lazy-count t)
;; -- ansi-color ----------------------------------------------------------------
(require 'ansi-color)
(add-hook 'compilation-filter-hook 'ansi-color-compilation-filter)
;; -- oderless ------------------------------------------------------------------
(install-once 'orderless)
(require 'orderless)
(setq completion-styles '(orderless basic)
completion-category-overrides '((file (styles basic partial-completion))))
;; -- evil ----------------------------------------------------------------------
(install-once 'evil)
;; need to be set before require-ing evil
(setq evil-undo-system 'undo-redo)
(require 'evil)
(evil-mode 1)
(evil-define-key '(normal motion) 'global (kbd "C-k") 'evil-scroll-up)
(evil-define-key '(normal motion) 'global (kbd "C-j") 'evil-scroll-down)
(evil-define-key 'motion compilation-mode-map "gr" 'recompile)
;; -- magit ---------------------------------------------------------------------
(install-once 'magit)
(require 'magit)
|