-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
84 lines (68 loc) · 2.44 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
(package-initialize)
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/custom-lisp/"))
(require 'init-packages)
(require 'init-local)
(require 'init-org)
(require 'init-twit)
(require 'init-ack)
(require 'init-tex)
;;smex settings
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "M-X") 'smex-major-mode-commands)
;; This is your old M-x.
(global-set-key (kbd "C-c C-c M-x") 'execute-extended-command)
;; General settings.
(setq confirm-kill-emacs 'yes-or-no-p)
(setq inhibit-startup-message +1)
(setq tool-bar-mode nil)
(setq visible-bell +1)
(global-linum-mode +1)
(ido-mode +1)
;; When splitting the window, focus on new window.
(global-set-key "\C-x2" (lambda () (interactive)(split-window-vertically) (other-window 1)))
(global-set-key "\C-x3" (lambda () (interactive)(split-window-horizontally) (other-window 1)))
;; setting aspell for ispell
(setq windows-ispell-dictionary local-aspell-exe)
(if (file-exists-p windows-ispell-dictionary)
(custom-set-variables
'(ispell-dictionary "english")
'(ispell-program-name windows-ispell-dictionary)))
;; Display time and date.
(setq display-time-day-and-date t)
(display-time)
;; See path in frame title
(setq frame-title-format
'((:eval (if (buffer-file-name)
(abbreviate-file-name (buffer-file-name))
"%b"))))
;; Keep track of recently visited files
(require 'recentf)
(setq recentf-max-saved-items 200
recentf-max-menu-items 15)
(recentf-mode +1)
;; Highlight matching parentheses
(require 'paren)
(setq show-paren-style 'parenthesis)
(show-paren-mode +1)
(add-to-list 'auto-mode-alist '("\\.bat\\'" . batch-mode))
;; Keep back ups to their own folder.
;; From StackOverflow (http://stackoverflow.com/questions/2680389/how-to-remove-all-files-ending-with-made-by-emacs).
(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
)
(defvar timestamp-format "%Y-%m-%d %H:%M:%S")
(defun timestamp ()
(interactive)
(insert (format-time-string timestamp-format(current-time) "\n")
)
(insert "\n")
)
(setq custom-file "~/.emacs.d/lisp/init-custom.el")
(load custom-file)
;; Load theme
(load-theme 'afternoon)