-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinit.el
More file actions
107 lines (91 loc) · 3.35 KB
/
init.el
File metadata and controls
107 lines (91 loc) · 3.35 KB
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
;;
;; Basic emacs preferences
;;
;; Start the timer
(defvar *emacs-load-start* (current-time))
;; Get rid of that abominable beep
(setq ring-bell-function (lambda () (message "*beep*")))
;; Don't make backup files all the time. (autosave files are still made
;; but thats okay since they are deleted when a buffer is saved,
;; backups aren't).
(setq make-backup-files nil)
;; Show key sequences immediately
(setq echo-keystrokes 0.01)
;; Push UTF-8
(prefer-coding-system 'utf-8)
(set-language-environment "utf-8")
(setq default-file-name-coding-system 'utf-8)
(setq current-language-environment "UTF-8")
(setq default-input-method "rfc1345")
;; no-tabs
(setq-default indent-tabs-mode nil)
;; Turn off noob gui parts
(scroll-bar-mode 0)
(menu-bar-mode 0)
(tool-bar-mode 0)
(tooltip-mode 0)
(setq inhibit-startup-message t)
(setq inhibit-startup-screen t)
(setq inhibit-startup-echo-area-message t)
(setq initial-scratch-message nil)
(setq pop-up-windows t)
(save-place-mode 1)
(put 'downcase-region 'disabled nil)
(fset 'yes-or-no-p 'y-or-n-p)
(setq compilation-ask-about-save nil)
(setq use-dialog-box nil)
;; set parenthesis matching to highlighting instead of cursor jumping
(show-paren-mode 1)
(setq transient-mark-mode t)
(set-frame-font "firacode-13")
(setq-default fill-column 80)
(set-default 'cursor-type '(bar . 1))
(blink-cursor-mode 0)
(setq visible-bell t)
(setq ring-bell-function 'ignore)
;; Turn on auto fill for all text modes (doesn't seem to be working)
(add-hook 'text-mode-hook 'text-mode-hook-identify)
;; Turn on auto fill for all modes instead
(setq-default auto-fill-function 'do-auto-fill)
(setq browse-url-browser-function 'browse-url-generic)
;; My keybindings. It is importand that this is loaded before the
;; experimental stuff so that, in case of an error, emacs is usable.
(load "keybindings")
;; Modify all modes based on c-mode
(add-hook 'c-mode-common-hook
(lambda ()
;; Reckognize studlyCaps as seperate words when moving around
(subword-mode 1)))
;; Load package manager
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/")))))
(define-advice make-frame (:around (fn &rest args) suppress)
"Suppress making new frame; return existing frame."
(message "make-frame suppressed; proceed at your own peril.")
(selected-frame))
(setq epg-pinentry-mode 'loopback)
;; Load the files in the home folder
;;-----------
;; Custom functions
(load "custom-func")
;; Configure the calendar and holidays
(load "calendar-conf")
;; Setup major modes
(require 'load-modes)
;;-----------
;; Start the server
(if window-system
(server-start))
(set-face-attribute 'mode-line nil :box nil)
(set-face-attribute 'mode-line-inactive nil :box nil)
(message "Done loading in %ds"
(- (time-to-seconds (current-time))
(time-to-seconds *emacs-load-start*)))