-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
104 lines (82 loc) · 2.32 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(setq-default make-backup-files nil)
(setq make-backup-files nil)
(setq auto-save-default nil)
;;time
(display-time)
;;number
(global-linum-mode 1)
(setq linum-format "%4d | ")
;(defun te ()
;(gdb "gdb -i=mi $*")
;(emacs_gdb)
;)
(fset 'emacs_gdb
"g\C-m\C-[xgdb man\C-i\C-m\C-xo\C-xo\C-xo\C-x0\C-xo\C-x0\C-xo\C-x0")
;just for gdb-mode
;(global-set-key [f12] 'gdb)
(global-set-key [f11] 'emacs_gdb)
(global-set-key [f8] 'gud-cont)
(global-set-key [f7] 'gud-next)
;(global-set-key [f6] 'delete-window)
;(global-set-key [f3] 'other-window)
(global-set-key [f2] 'enlarge-window)
;HELP:
;http://www.voidcn.com/article/p-kajzyowe-be.html
;https://blog.csdn.net/ruglcc/article/details/7875631
;https://blog.csdn.net/Matrix_Designer/article/details/5869886
;FOR HELP:
;C-h k:key / C-h f:function
(fset 'copy_own
"\C-xh\M-w")
(global-set-key (kbd "C-q") 'copy_own)
;(defun my_own_define_copy (&optionl arg)
;"Copy paragraphes at point"
;(interactive "P")
;(let ((beg (progn backward-paragraph 1) (point)))
;(end (progn (forward-paragraph arg) (point))))
;(copy-region-as-kill beg end)
;)
;(beginning-of-buffer)
;(set-mark-command)
;(end-of-buffer)
;(kill-ring-save)
;(message "Hello,World!")
;(mark-whole-buffer)
;(defun my_own_define_copy ()
;(interactive)
;(mark-whole-buffer)
;(message "copy buffer")
;;(kill-ring-save (region-beginning) (buffer-end))
;)
;indent
(setq c-default-style "linux"
c-basic-offset 4)
;;mouse
(mouse-wheel-mode -1)
;;ban the tool bar of start up
(tool-bar-mode 0)
(menu-bar-mode 0)
(scroll-bar-mode 0)
;;ban the page of start up
(setq inhibit-startup-message t)
;;gungdong
(setq scroll-step 10 )
(electric-pair-mode t)
(electric-indent-mode t)
(electric-layout-mode t)
;;tab
(setq default-tab-width 4)
;;column
(column-number-mode t)
(show-paren-mode t)
;copy from stackoverflow
(require 'cl-lib)
(defadvice save-buffers-kill-emacs (around no-query-kill-emacs activate)
"Prevent annoying \"Active processes exist\" query when you quit Emacs."
(cl-letf (((symbol-function #'process-list) (lambda ())))
ad-do-it))