-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.emacs
73 lines (50 loc) · 1.82 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
(package-initialize)
(cua-mode) ;; use ctrl-x, ctrl-c, ctrl-v, ctrl-z, ctrl-y shortcuts
;; disable automatic description as this is both annoying and can easily
;; get intero stuck
(global-eldoc-mode -1)
(add-hook 'minibuffer-setup-hook
(lambda () (setq truncate-lines nil)))
(setq resize-mini-windows t) ; grow and shrink as necessary
(setq max-mini-window-height 10) ; grow up to max of 10 lines
(setq minibuffer-scroll-window t)
;; will search for cabal in these directories
(add-to-list 'exec-path
"/usr/local/bin")
(add-to-list 'exec-path
"~/.local/bin")
;; load packages
(load "~/.emacs.d/my-loadpackages.el")
;; cycle through buffers with Ctrl-Tab
(global-set-key (kbd "<C-tab>") 'other-window)
(global-set-key (kbd "M-<left>") 'windmove-left) ; move to left window
(global-set-key (kbd "M-<right>") 'windmove-right) ; move to right window
(global-set-key (kbd "M-<up>") 'windmove-up) ; move to upper window
(global-set-key (kbd "M-<down>") 'windmove-down) ; move to lower window
;; enable visual feedback on selections
;(setq transient-mark-mode t)
(global-set-key (kbd "C-~") 'next-buffer)
(global-set-key (kbd "C-`") 'previous-buffer)
;; line numbers
(global-linum-mode 1)
;; no tabs
(setq c-basic-indent 4)
(setq tab-width 4)
(setq-default indent-tabs-mode nil)
(setq indent-tabs-mode nil)
;; font
;; (set-frame-font "Anonymous Pro-16")
;; scrolling
(setq scroll-step 1
scroll-conservatively 10000)
;; auto indent
(define-key global-map (kbd "RET") 'newline-and-indent)
;; parens
(show-paren-mode 1)
;; Warn before you exit emacs!
(setq confirm-kill-emacs 'yes-or-no-p)
;; make all "yes or no" prompts show "y or n" instead
(fset 'yes-or-no-p 'y-or-n-p)
;; I use version control, don't annoy me with backup files everywhere
(setq make-backup-files nil)
(setq auto-save-default nil)