Emacs 配置plugin

  ;;;plugin
1
(add-to-list 'load-path "e:/emacs-plugin/") 2 3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4 ;auto-complete plugin 5 (require 'auto-complete-config) 6 (add-to-list 'ac-dictionary-directories "e:/emacs-plugin//ac-dict") 7 (ac-config-default) 8 (setq auto-complete-mode t) 9 ;;;(define-key ac-mode-map (kbd "F2") 'auto-complete) 10 ;;;(ac-set-trigger-key "TAB") 11 ;;;(setq ac-auto-start nil) 12 ;;;(setq ac-auto-start 3) 13 ;;;(define-key ac-completing-map "\M-/" 'ac-stop) 14 ;; Just ignore case 15 (setq ac-ignore-case t) 16 ;; Ignore case if completion target string doesn't include upper characters 17 (setq ac-ignore-case 'smart) 18 ;; Distinguish case 19 ;(setq ac-ignore-case nil) 20 ;;;ac face 21 (set-face-background 'ac-candidate-face "lightgray") 22 (set-face-underline 'ac-candidate-face "darkgray") 23 (set-face-background 'ac-selection-face "steelblue") 24 25 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 26 (add-to-list 'load-path "e:/emacs-plugin/yasnippet-0.6.1c") 27 (require 'yasnippet) ;; not yasnippet-bundle 28 (yas/initialize) 29 (yas/load-directory "e:/emacs-plugin/yasnippet-0.6.1c/snippets") 30 31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 32 ;color-theme 33 ;(add-to-list 'load-path "~/.emacs.d/") 34 (add-to-list 'load-path "e:/emacs-plugin/theme") 35 (require 'color-theme) 36 (color-theme-initialize) 37 ;(color-theme-jb-simple) 38 ;(color-theme-whateveryouwant) 39 (setq minibuffer-max-depth nil) 40 (setq my-color-themes (list 'color-theme-billw 'color-theme-jsc-dark 41 'color-theme-sitaramv-solaris 'color-theme-resolve 42 'color-theme-classic 'color-theme-jonadabian-slate 43 'color-theme-kingsajz 'color-theme-shaman 44 'color-theme-subtle-blue 45 'color-theme-sitaramv-nt 'color-theme-wheat 46 'color-theme-whateveryouwant 'color-theme-matrix 47 'color-theme-emacs-21)) 48 (defun my-theme-set-default () ; Set the first row 49 (interactive) 50 (setq theme-current my-color-themes) 51 (funcall (car theme-current))) 52 (defun my-describe-theme () ; Show the current theme 53 (interactive) 54 (message "%s" (car theme-current))) 55 ; Set the next theme (fixed by Chris Webber - tanks) 56 (defun my-theme-cycle () 57 (interactive) 58 (setq theme-current (cdr theme-current)) 59 (if (null theme-current) 60 (setq theme-current my-color-themes)) 61 (funcall (car theme-current)) 62 (message "%S" (car theme-current))) 63 (setq theme-current my-color-themes) 64 (setq color-theme-is-global nil) ; Initialization 65 ;(my-theme-set-default) 66 (color-theme-emacs-21) 67 (global-set-key [f12] 'my-theme-cycle) 68 69 ;;;;;;;;;;;;;;;;;;;;; 70 ;(require 'wcy-swbuff) 71 ;; then you can use <C-tab> and <C-S-kp-tab> to switch buffer. 72 ;(global-set-key (kbd "<C-tab>") 'wcy-switch-buffer-forward) 73 ;(global-set-key (kbd "<C-S-kp-tab>") 'wcy-switch-buffer-backward) 74 ; 75 ;(setq wcy-switch-buffer-active-buffer-face 'highlight) 76 ;(setq wcy-switch-buffer-inactive-buffer-face 'secondary-selection ) 77 78 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 79 ;;;keisen-mode是一个用来绘制表格的好工具 80 (if window-system 81 (autoload 'keisen-mode "keisen-mouse" "MULE table" t) 82 (autoload 'keisen-mode "keisen-mule" "MULE table" t)) 83 84 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 85 (require 'highlight-symbol) 86 (global-set-key [f3] 'highlight-symbol-at-point) 87 (global-set-key [(control f3)] 'highlight-symbol-next) 88 (global-set-key [(shift f3)] 'highlight-symbol-prev) 89 (global-set-key [(meta f3)] 'highlight-symbol-prev) 90 91 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 92 (require 'tabbar) 93 (tabbar-mode) 94 (define-prefix-command 'lwindow-map) 95 (global-set-key (kbd "<M-up>") 'tabbar-backward-group) 96 (global-set-key (kbd "<M-down>") 'tabbar-forward-group) 97 (global-set-key (kbd "<M-left>") 'tabbar-backward) 98 (global-set-key (kbd "<M-right>") 'tabbar-forward) 99 100 ;;;; 设置tabbar外观 101 ;;;; 设置默认主题: 字体, 背景和前景颜色,大小 102 (set-face-attribute 'tabbar-default-face nil 103 :family "DejaVu Sans Mono" 104 :background "gray80" 105 :foreground "gray30" 106 :height 1.0 107 ) 108 ; 设置左边按钮外观:外框框边大小和颜色 109 (set-face-attribute 'tabbar-button-face nil 110 :inherit 'tabbar-default 111 :box '(:line-width 1 :color "yellow70") 112 ) 113 ; 设置当前tab外观:颜色,字体,外框大小和颜色 114 (set-face-attribute 'tabbar-selected-face nil 115 :inherit 'tabbar-default 116 :foreground "DarkGreen" 117 :background "LightGoldenrod" 118 :box '(:line-width 2 :color "DarkGoldenrod") 119 :overline "black" 120 :underline "black" 121 :weight 'bold 122 ) 123 ; 设置非当前tab外观:外框大小和颜色 124 (set-face-attribute 'tabbar-unselected-face nil 125 :inherit 'tabbar-default 126 :box '(:line-width 2 :color "#00B2BF") 127 ) 128 129 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 130 ;;;cedet 131 (load-file "e:/emacs-plugin/cedet-1.1/common/cedet.el") 132 133 ;Enable the Project management system 134 (global-ede-mode 1) 135 136 ;;;semantic 137 ;; Enabling Semantic (code-parsing, smart completion) features 138 139 ;; * This enables the database and idle reparse engines 140 (semantic-load-enable-minimum-features) 141 142 ;; * This enables some tools useful for coding, such as summary mode, 143 ;; imenu support, and the semantic navigator 144 (semantic-load-enable-code-helpers) 145 146 ;; * This enables even more coding tools such as intellisense mode, 147 ;; decoration mode, and stickyfunc mode (plus regular code helpers) 148 (semantic-load-enable-gaudy-code-helpers) 149 150 ;(global-semantic-stickyfunc-mode -1) 151 ;(setq semantic-stickyfunc-mode nil) 152 ;; * This enables the use of Exuberant ctags if you have it installed. 153 ;; If you use C++ templates or boost, you should NOT enable it. 154 155 ;(setq semantic-ectag-program "C:/cygwin/bin/ctags.exe") 156 (setq semantic-ectag-program "C:/Windows/System32/ctags.exe") 157 158 (semantic-load-enable-all-exuberent-ctags-support) 159 ;; Or, use one of these two types of support. 160 161 ;; Add support for new languages only via ctags. 162 (semantic-load-enable-primary-exuberent-ctags-support) 163 164 ;; Add support for using ctags as a backup parser. 165 (semantic-load-enable-secondary-exuberent-ctags-support) 166 167 (semantic-load-enable-gaudy-code-helpers) 168 169 (semantic-load-enable-semantic-debugging-helpers) 170 171 172 ;;;srecode 173 ; Enable template insertion menu 174 (global-srecode-minor-mode 1) 175 176 (semantic-load-enable-excessive-code-helpers) 177 (require 'semantic-ia) 178 (require 'semantic-gcc) 179 (semantic-add-system-include "C:/cygwin/usr/include" 'c-mode) 180 181 (setq-mode-local c-mode semanticdb-find-default-throttle 182 '(project unloaded system recursive)) 183 184 (defun my-semantic-hook () 185 (imenu-add-to-menubar "TAGS")) 186 (add-hook 'semantic-init-hooks 'my-semantic-hook) 187 188 (require 'semanticdb) 189 (global-semanticdb-minor-mode 1) 190 191 ;; if you want to enable support for gnu global 192 (when (cedet-gnu-global-version-check t) 193 (require 'semanticdb-global) 194 (semanticdb-enable-gnu-global-databases 'c-mode) 195 (semanticdb-enable-gnu-global-databases 'c++-mode)) 196 197 ;; enable ctags for some languages: 198 ;; Unix Shell, Perl, Pascal, Tcl, Fortran, Asm 199 (when (cedet-ectag-version-check) 200 (semantic-load-enable-primary-exuberent-ctags-support)) 201 202 ;;;(ede-cpp-root-project "Test" 203 ;;; :name "Test Project" 204 ;;; :file "~/work/project/CMakeLists.txt" 205 ;;; :include-path '("/" 206 ;;; "/Common" 207 ;;; "/Interfaces" 208 ;;; "/Libs" 209 ;;; ) 210 ;;; :system-include-path '("~/exp/include") 211 ;;; :spp-table '(("isUnix" . "") 212 ;;; ("BOOST_TEST_DYN_LINK" . ""))) 213 214 (defun my-cedet-hook () 215 (local-set-key [(control return)] 'semantic-ia-complete-symbol) 216 (local-set-key "\C-c?" 'semantic-ia-complete-symbol-menu) 217 (local-set-key "\C-c>" 'semantic-complete-analyze-inline) 218 (local-set-key "\C-cp" 'semantic-analyze-proto-impl-toggle)) 219 (add-hook 'c-mode-common-hook 'my-cedet-hook) 220 221 (defun my-c-mode-cedet-hook () 222 (local-set-key "." 'semantic-complete-self-insert) 223 (local-set-key ">" 'semantic-complete-self-insert)) 224 (add-hook 'c-mode-common-hook 'my-c-mode-cedet-hook) 225 226 ;;;;;;;;;;; 227 (global-semantic-stickyfunc-mode) 228 ;;;;;;;;;; 229 ;;;nXML mode 230 ;(load "e:/emacs-plugin/nxml-mode-20041004/rng-auto.el") 231 ;;;;;;;;;;; 232 (setq midnight-mode t) 233 234 ;;;;;;;;;;; 235 ;;;cursor 236 (require 'cursor-chg) ; Load the library 237 (toggle-cursor-type-when-idle 1) ; Turn on cursor change when Emacs is idle 238 (change-cursor-mode 1) ; Turn on change for overwrite, read-only, and input mode 239 240 ;;;cursor 241 (load "e:/emacs-plugin/crosshairs.el") 242 ;(global-set-key "\C-c@ \C-c)" 'crosshairs-mode) 243 ;;;;;;;;;;;linum+ 244 (require 'linum+) 245 ;;;(fringe-mode) 246 (require 'frame-cmds) 247 248 ;;;;;;;;;;;nxhtml 249 ;(load "e:/emacs-plugin/nxhtml/autostart.el") 250 ;(setq auto-mode-alist 251 ; (cons '("\\.jsp" . nxhtml-mode) 252 ; auto-mode-alist)) 253 254 ;;;;;;;;;;;mode line enchance 255 (require 'modeline-posn) 256 (column-number-mode 1) 257 (size-indication-mode 1) 258 259 ;;;;;;;;;;;kill ring 260 (require 'browse-kill-ring) 261 (global-set-key [f9] 'browse-kill-ring) 262 263 ;;;;;;;;;;;icicles 264 (add-to-list 'load-path "e:/emacs-plugin/icicles/") 265 (require 'icicles) 266 (icy-mode 1) 267 268 ;;;;;;;;;;;cygwin 269 ;;;(setenv "PATH" (concat "c:/cygwin/bin;" (getenv "PATH"))) 270 ;;;(setq exec-path (cons "c:/cygwin/bin/" exec-path)) 271 ;;;(require 'cygwin-mount) 272 ;;;(cygwin-mount-activate) 273 274 ;;;(add-hook 'comint-output-filter-functions 275 ;;; 'shell-strip-ctrl-m nil t) 276 ;;;(add-hook 'comint-output-filter-functions 277 ;;; 'comint-watch-for-password-prompt nil t) 278 ;;;(setq explicit-shell-file-name "bash.exe") 279 ;;;;; For subprocesses invoked via the shell 280 ;;;;; (e.g., "shell -c command") 281 ;;;(setq shell-file-name explicit-shell-file-name) 282 283 ;;;;;;;;;;;menubar+ 284 ;(eval-after-load "menu-bar" '(require 'menu-bar+)) 285 286 ;;;;;;;;;;;scheme 287 ;(setq scheme-program-name "scm") 288 (setq scheme-program-name "guile") 289 ;(setq scheme-program-name "mit-scheme") 290 ;;;;;;;;;;;;;;quack.el 291 (require 'quack) 292 293 ;;;;;;;;;;;;;;cmuscheme.el 294 (autoload 'run-scheme "cmuscheme" "Run an inferior Scheme process." t) 295 296 (setq auto-mode-alist 297 (cons '("\\.scm$" . scheme-mode) 298 auto-mode-alist)) 299 300 ; Define C-c C-t to run my favorite command in inferior scheme mode: 301 (setq cmuscheme-load-hook 302 '((lambda () (define-key inferior-scheme-mode-map "\C-c\C-t" 303 'favorite-cmd)))) 304 305 ;;;;;;;;;;;xscheme.el 306 ;(require 'xscheme) 307 308 ;;;;;;;;;;;;;;bee-mode 309 ;;;(autoload 'bdb "bdb" "bdb mode" t) 310 ;;;(autoload 'bee-mode "bee-mode" "bee mode" t) 311 ;;;(setq auto-mode-alist 312 ;;; (append '(("\\.scm$" . bee-mode) 313 ;;; ("\\.sch$" . bee-mode) 314 ;;; ("\\.scme$" . bee-mode) 315 ;;; ("\\.bgl$" . bee-mode) 316 ;;; ("\\.bee$" . bee-mode)) 317 ;;; auto-mode-alist))
posted @ 2012-09-08 13:55  design0er  阅读(636)  评论(0编辑  收藏  举报

私信请邮件

destiny_1990@126.com