-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
52 lines (41 loc) · 1.25 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
;; diff-hl
(add-to-list 'load-path "~/.emacs.d/diff-hl")
(require 'diff-hl)
(require 'diff-hl-margin)
(global-diff-hl-mode)
(diff-hl-margin-mode)
;; auto indent
(setq electric-indent-mode nil)
;; cuda-mode
(add-to-list 'load-path "~/.emacs.d/cuda-mode")
(autoload 'cuda-mode "cuda-mode.el")
(add-to-list 'auto-mode-alist '("\\.cuh?\\'" . cuda-mode))
;; cmake-mode
(add-to-list 'load-path "~/.emacs.d/cmake-mode")
(require 'cmake-mode)
;; built-in config
;; Don't show the splash screen
(setq inhibit-startup-message t) ; Comment at end of line!
;; Turn off some unneeded UI elements
(menu-bar-mode -1) ; Leave this one on if you're a beginner!
(tool-bar-mode -1)
(scroll-bar-mode -1)
(set-face-attribute 'default nil :height 160)
(setq auto-save-default nil)
(setq auto-save-visited-mode nil)
(setq make-backup-files nil)
(setq-default indent-tabs-mode nil)
(defun scroll-up-one-line()
"Scroll up one line."
(interactive)
(scroll-up 1))
(defun scroll-down-one-line()
"Scroll down one line."
(interactive)
(scroll-down 1))
(recentf-mode 1)
(setq recentf-max-menu-items 25)
(setq recentf-max-saved-items 25)
(global-set-key (kbd "M-n") 'scroll-up-one-line)
(global-set-key (kbd "M-p") 'scroll-down-one-line)
(global-set-key (kbd "C-c r") 'recentf-open-files)