-
Notifications
You must be signed in to change notification settings - Fork 0
/
.emacs
78 lines (62 loc) · 1.92 KB
/
.emacs
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
;; -*- Emacs-Lisp -*-
(put 'eval-expression 'disabled nil) ; Enable command "ESC :".
(setq require-final-newline t) ; Makes sure the last line is terminated.
(setq auto-save-interval 1000) ; Do not auto-save too often.
;;
;; Set mouse-select color
;;
(set-face-background 'region' "SlateGray")
(set-face-foreground 'region' "white")
(set-face-background 'highlight' "DarkSlateBlue")
(set-face-foreground 'highlight' "white")
;;
;; End of Mouse colour selections
;;
;; 加载路径
(setq load-path (cons "~/my-lisp" load-path))
(setq load-path (cons "~/my-lisp/3rd-lisp" load-path))
(setq load-path (cons "~/my-lisp/3rd-lisp/language-mode" load-path))
;; 字体设置
(require 'my-font-size)
;; F2, F3类似ultraedit
(require 'my-like-ultraedit-conf)
;; 杂项
(require 'my-misc-conf)
;; tabber设置
(require 'my-tabbar-conf)
;; C/C++语言配置
(require 'my-c-conf)
;; python配置
(require 'my-python-conf)
;; 按键绑定
(require 'my-keybind)
;; org模式配置
(require 'my-org-mode)
;; markdown配置
(require 'markdown-config)
;; 加载zenburn主题
(add-to-list 'custom-theme-load-path "~/my-lisp/3rd-lisp/theme")
(load-theme 'zenburn t)
;; Ctrl-space在windows下被输入法切换占用,使用Ctrl-l替代
(global-set-key (kbd "C-l") 'set-mark-command)
;; 跳到指定行
(global-set-key (kbd "C-x g") 'goto-line)
;; 替换字符串
(global-set-key (kbd "C-o") 'replace-string)
(setq default-buffer-file-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(setq file-name-coding-system 'chinese-gbk);;设置文件名编码
(setq path-name-coding-system 'chinese-gbk);;设置目录路径名编码
;; org mode
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(require 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))
(add-hook 'yaml-mode-hook
'(lambda ()
(define-key yaml-mode-map "\C-m" 'newline-and-indent)))
(require 'go-mode)
(add-to-list 'auto-mode-alist '("\\.go\\'" . go-mode))
(add-hook 'go-mode
'(lambda ()
(electric-pair-mode)))
(server-start)