;;;C:\Documents and Settings\jims_mrs\Application Data
1 (load-file "D:/Program Files/emacs/HOME/.emacs")
2
3 ;;; Emacs Load Path
4 ;;(setq load-path (cons "D:/Program Files/emacs/HOME/.emacs" load-path))
D:\Program Files\emacs\HOME
1
2 (setenv "HOME" "D:/Program Files/emacs/HOME")
3 (setenv "PATH" "D:/Program Files/emacs/HOME")
4 ;;set the default file path
5 (setq default-directory "~/")
6 (add-to-list 'load-path "~/emacs/site-lisp")
7
8
9 ;;(server-start)
10
11
12
13
14 ;; 鍔ㄦ佸姞杞界殑浠g爜
15 ;; M-x load-file,
16 ;; M-x eval-buffer
17
18 ;鍏抽棴鍚姩鐢婚潰
19 (custom-set-variables
20 ;; custom-set-variables was added by Custom.
21 ;; If you edit it by hand, you could mess it up, so be careful.
22 ;; Your init file should contain only one such instance.
23 ;; If there is more than one, they won't work right.
24 '(column-number-mode t)
25 '(display-time-mode t)
26 '(inhibit-startup-screen t)
27 '(show-paren-mode t)
28 '(truncate-partial-width-windows nil))
29
30 ;;璁劇疆涓漢淇℃伅
31 (setq user-full-name "mrx jimsmorong")
32 (setq user-mail-address "jimsmorong@gmail.com")
33
34 ;;鍔犺澆棰滆壊
35 (require 'color-theme)
36 ;;M-x color-theme-select
37 ;;閫夋嫨鍝竴縐嶉鑹?br> 38 (color-theme-comidia)
39
40 ;;鍔犺澆lua mode
41 (require 'lua-mode)
42
43 ;;鍔犺澆google_protobuf
44 (require 'protobuf-mode)
45
46 ;;鍔犺澆CSope
47 (require 'xcscope) ;;鍔犺澆xcscope
48
49 ;;鍔犺澆yasnippet
50 ;;(require 'yasnippet/yasnippet) ;; not yasnippet-bundle
51 ;;(yas/initialize)
52 ;;(yas/load-directory "~/.emacs.d/plugins/yasnippet-0.6.1c/snippets")
53
54 ;;load browse-kill-ring
55 (require 'browse-kill-ring)
56 (global-set-key [(control c)(k)] 'browse-kill-ring)
57 (browse-kill-ring-default-keybindings)
58
59 ;;閰嶇疆ido鎻掍歡錛岃繖涓彲浠ヤ嬌浣犲湪鐢–-x C-f鎵撳紑鏂囦歡鐨勬椂鍊欏湪鍚庨潰鏈夋彁紺?br> 60 ;;----------------------------------------------------------------------------------------
61 (require 'ido)
62 (ido-mode t)
63 ;;----------------------------------------------------------------------------------------
64
65
66
67
68 ;;鍔犺澆tabbar.el
69 ;;------------------------------------------------------------------------------------------------------------------------------------------
70 (require 'tabbar)
71 (tabbar-mode t)
72 (global-set-key [(control shift tab)] 'tabbar-backward)
73 (global-set-key [(control tab)] 'tabbar-forward)
74 ;;榛樿鐨勫垎緇勬柟娉曞茍涓嶆槸姣忎釜浜洪兘鍠滄錛屽畠浼氭妸鍚庣紑鍚嶇浉鍚岀殑鏂囦歡鍒嗕負涓緇勶紝
75 ;;姣斿璇磒erl鑴氭湰閮芥墧鍦ㄤ竴涓粍閲岋紝yaml鏂囦歡鍙堟墧鍦ㄥ彟涓涓粍閲屻傚啓浠g爜鐨勬椂鍊欙紝
76 ;;鍦ㄨ繖涓や釜緇勯噷鍒囨崲瀹炲湪鏄お楹葷儲浜嗭紒鎴戝氨鍠滄鎶婇櫎浜咵macs Buffer涔嬪鐨勬枃浠?br> 77 ;;閮芥斁鎴愪竴緇勶紝鍗蟲垜鑷繁鎵撳紑鐨勬枃浠舵斁鎴愪竴緇?br> 78 (setq tabbar-buffer-groups-function
79 (lambda (b) (list "All Buffers")))
80 (setq tabbar-buffer-list-function
81 (lambda ()
82 (remove-if
83 (lambda(buffer)
84 (find (aref (buffer-name buffer) 0) " '"))
85 (buffer-list))))
86
87 ;;------------------------------------------------------------------------------------------------------------------------------------------
88
89 ;;load line_number
90 ;;(set-scroll-bar-mode nil) ; no scroll bar, even in x-window system (recommended)
91 ;;(require 'wb-line-number)
92 ;;(wb-line-number-toggle)
93
94
95 ;;鏄劇ず鏃墮棿
96 (display-time)
97
98 ;;鏄劇ず琛屽彿
99 (column-number-mode t)
100 (show-paren-mode t)
101
102 ;;鍘繪帀宸ュ叿鏍?br>103 (tool-bar-mode nil)
104
105 ;;鍘繪帀鑿滃崟鏍?br>106 ;;ctrl+榧犳爣鍙抽敭 鍙互鎸夊嚭鑿滃崟
107 ;;(menu-bar-mode nil)
108
109 ;;鍘繪帀婊氬姩鏉?br>110 (set-scroll-bar-mode nil)
111
112 ;;鍏抽棴鐑︿漢鐨勫嚭閿欐椂鐨勬彁紺哄0
113 (setq visible-bell t)
114
115 ;;婊氬姩欏甸潰鏃舵瘮杈冭垝鏈嶏紝涓嶈鏁撮〉鐨勬粴鍔?br>116 (setq scroll-step 1
117 scroll-margin 3
118 scroll-conservatively 10000)
119
120 ;鍦ㄦ爣棰樻爮鏄劇ずbuffer鐨勫悕瀛?br>121 (setq frame-title-format "%b@emacs")
122
123 ;;璁劇疆榛樿宸ヤ綔鐩綍
124 (setq default-directory "D:/Program Files/emacs/mrx")
125 ;;(setq default-directory "d:/mate2/dqprotocol")
126
127 ; F5:嬋媧籹peedbar
128 (global-set-key [(f5)] 'speedbar-get-focus)
129
130 ;;鍔ㄦ佸鍔犲噺灝戝瓧浣撳ぇ灝?br>131 (defun sacha/increase-font-size ()
132 (interactive)
133 (set-face-attribute 'default
134 nil
135 :height
136 (ceiling (* 1.10
137 (face-attribute 'default :height)))))
138 (defun sacha/decrease-font-size ()
139 (interactive)
140 (set-face-attribute 'default
141 nil
142 :height
143 (floor (* 0.9
144 (face-attribute 'default :height)))))
145 (global-set-key (kbd "C-+") 'sacha/increase-font-size)
146 (global-set-key (kbd "C--") 'sacha/decrease-font-size)
147
148
149
150 (custom-set-faces
151 ;; custom-set-faces was added by Custom.
152 ;; If you edit it by hand, you could mess it up, so be careful.
153 ;; Your init file should contain only one such instance.
154 ;; If there is more than one, they won't work right.
155 '(default ((t (:inherit nil :stipple nil :background "Black" :foreground "SteelBlue" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight bold :height 90 :width normal :foundry "outline" :family #("寰蔣闆呴粦" 0 4 (charset chinese-gbk)))))))
156
157 ;; read pdf
158 ;;(load-file "~/dos/emacs/doc-view.el")
159 ;;(require 'doc-view)
160
161
162
163
164
165
166 ;;
167 ;;(setq gnuwin32_bin "GetGnuWin32\gnuwin32\bin")
168 (setq gnuwin32_bin "D:/Program Files/GetGnuWin32/gnuwin32/bin;")
169
170 (setenv "PATH"
171 (concat
172 gnuwin32_bin
173 (getenv "PATH")
174 )
175 )
176
177
178 (require 'doc-view)
179
180 ;;閰嶇疆linum鎻掍歡錛屾樉紺鴻鍙?br>181 ;;-----------------------------------------------------------------------------------
182 (require 'linum)
183 (global-linum-mode t)
184 ;;-----------------------------------------------------------------------------------
185
186
187 (defun my-insert-date ()
188 (interactive)
189 (insert "//")
190 (insert (user-full-name))
191 (insert "@")
192 (insert (format-time-string "%Y/%m/%d %H:%M:%S" (current-time))))
193 (global-set-key (kbd "C-c m d") 'my-insert-date)
194
195
196 (require 'cmake-mode)
灝嗛檮浠朵繚瀛樺湪D:\Program Files\emacs\ntemacs23\site-lisp
http://www.shnenglu.com/Files/jimsmorong/site-lisp.zip

]]>