-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
90 lines (68 loc) · 3.23 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
;;(require 'linum)
(global-linum-mode 1)
(add-to-list 'load-path "~/.emacs.d/auto-complete") ; This may not be appeared if you have already added.
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(ac-config-default)
;;(add-to-list 'load-path "C:/.emacs.d/go/")
;;(require 'go-mode)
(global-auto-revert-mode t)
;;(set-buffer-file-coding-system 'utf-8)
;;(set-default-coding-systems 'utf-8)
;;(prefer-coding-system 'utf-8)
;;(setq default-process-coding-system '(utf-8 . utf-8))
;;(setq locale-coding-system 'utf-8)
;;(setq file-name-coding-system 'utf-8)
;;(setq default-buffer-file-coding-system 'utf-8)
(setq-default cursor-type 'bar)
(setq default-tab-width 4)
(setq tab-width 4)
(setq indent-tabs-mode nil)
(setq c-basic-offset 4)
(setq make-backup-files nil)
(setq frame-title-format "GNU Emacs@ [%f]")
(setq default-line-spacing 4)
(global-hl-line-mode t)
(setq inhibit-startup-message t)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(auto-hscroll-mode t)
'(column-number-mode t)
'(current-language-environment "utf-8")
'(custom-enabled-themes nil)
'(make-backup-files nil)
'(mouse-wheel-progressive-speed nil)
'(mouse-wheel-scroll-amount (quote (3 ((shift) . 1) ((control)))))
'(show-paren-mode t)
'(size-indication-mode t)
'(truncate-lines t)
'(truncate-partial-width-windows t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:inherit nil :stipple nil :background "SystemWindow" :foreground "SystemWindowText" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 143 :width normal :foundry "outline" :family #("新宋体" 0 3 (charset chinese-gbk))))))
'(cursor ((t (:background "black" :width condensed))))
'(font-lock-comment-face ((((class color) (min-colors 16) (background light)) (:foreground "Forestgreen"))))
'(font-lock-constant-face ((((class color) (min-colors 16) (background light)) (:foreground "red"))))
'(font-lock-function-name-face ((((class color) (min-colors 16) (background light)) (:foreground "Black"))))
'(font-lock-keyword-face ((((class color) (min-colors 16) (background light)) (:foreground "blue"))))
'(font-lock-preprocessor-face ((t (:inherit nil :foreground "blue"))))
'(font-lock-type-face ((((class color) (min-colors 16) (background light)) nil)))
'(font-lock-variable-name-face ((((class color) (min-colors 16) (background light)) (:foreground "Black"))))
'(speedbar-highlight-face ((((class color) (background light)) (:background "black" :foreground "black")))))
;insert-current-date-time
(defun insert-current-time ()
(interactive)
(insert (format-time-string "%Y-%m-%d %H:%M:%S")))
(define-key global-map [(f7)] 'insert-current-time)
;;cls
(defun eshell/cls()
"to clear the eshell buffer."
(interactive)
(let ((inhibit-read-only t))
(erase-buffer)))