Last active
December 15, 2015 22:09
-
-
Save junstrix/5330810 to your computer and use it in GitHub Desktop.
fix ecb mouse and tips , and fix semantic include path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") | |
| ("marmalade" . "http://marmalade-repo.org/packages/") | |
| ("melpa" . "http://melpa.milkbox.net/packages/"))) | |
| (load-file "D:/emacs-24.3/c_config.el") | |
| (setq user-mail-address "[email protected]") | |
| (setq user-full-name "Junpeng Li") | |
| (global-set-key (kbd "M-p") 'scroll-up-line) | |
| (global-set-key (kbd "M-n") 'scroll-down-line) | |
| ;; show time | |
| (setq display-time-24hr-format t) | |
| (setq display-time-load-average t) | |
| (display-time) | |
| (add-to-list 'load-path "~/.emacs.d") | |
| (require 'xcscope) | |
| (add-hook 'c-mode-common-hook '(lambda() (require 'xcscope))) | |
| (setq cscope-do-not-update-database t) | |
| ;; imenu 索引 | |
| (require 'imenu) | |
| (defun my_add_imenu_to_menu () | |
| "add imenu to menu." | |
| (condition-case nil (imenu-add-to-menubar "speebar") (error nil))) | |
| (add-hook 'c-mode 'my_add_imenu_to_menu) | |
| (add-hook 'c++-mode 'my_add_imenu_to_menu) | |
| ;;recentf 最这打开的文件 | |
| (require 'recentf) | |
| (recentf-mode t) | |
| (setq recentf-max-menu-items 25) | |
| (global-set-key "\C-x\ \C-r" 'recentf-open-files) | |
| ;; yasnippet | |
| (add-to-list 'load-path "~/.emacs.d/elpa/yasnippet-bundle-0.6.1/") | |
| (require 'yasnippet-bundle) | |
| (yas/global-mode t) | |
| ;; Semantic | |
| (require 'semantic) | |
| (semantic-mode t) | |
| (global-semantic-idle-completions-mode t) | |
| (global-semantic-decoration-mode t) | |
| (global-semantic-highlight-func-mode t) | |
| (global-semantic-show-unmatched-syntax-mode t) | |
| (setq semantic-c-dependency-system-include-path (quote ("/usr/include" "C:/MinGW/include"))) | |
| (setq semantic-default-c-path (quote ("C:/Users/junstrix/Desktop/zigbee/ZStack-CC2530-2.5.1a/Components/inc8051/inc" "C:/Users/junstrix/Desktop/zigbee/ZStack-CC2530-2.5.1a/Components/inc8051"))) | |
| ;; CC-mode | |
| (add-hook 'c-mode-hook '(lambda () | |
| (setq ac-sources (append '(ac-source-semantic) ac-sources)) | |
| (local-set-key (kbd "RET") 'newline-and-indent) | |
| (linum-mode t) | |
| (semantic-mode t))) | |
| ;; auto-complete | |
| (add-to-list 'load-path "~/.emacs.d/elpa/popup-20130708.2245/") | |
| (add-to-list 'load-path "~/.emacs.d/elpa/auto-complete-20130724.1750/") | |
| (require 'auto-complete) | |
| (require 'auto-complete-config) | |
| (add-to-list 'ac-dictionary-directories "~/.emacs.d/elpa/auto-complete-20130724.1750/dict/") | |
| (global-auto-complete-mode t) | |
| (ac-config-default) | |
| ;; ecb | |
| (setq ecb-primary-secondary-mouse-buttons (quote mouse-1--mouse-2)) | |
| (setq ecb-tip-of-the-day nil) | |
| ;; IDO | |
| ;;(require 'ido) | |
| ;;(ido-mode t) | |
| ;; no splash | |
| (setq inhibit-startup-message t) | |
| ;;是否禁止菜单栏和工具栏 | |
| (if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) | |
| (if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) | |
| ;;(if (fboundp 'menu-bar-mode) (menu-bar-mode -1)) | |
| ;;所有的备份文件转移到~/emacs_backup目录下 | |
| (setq backup-directory-alist (quote (("." . "~/.emacs.d/emacs_backup")))) | |
| (setq version-control t) | |
| (setq kept-old-versions 2) | |
| (setq kept-new-versions 3) | |
| (setq delete-old-versions t) | |
| (setq backup-directory-alist '(("." . "~/.emacs.d/emacs_backup"))) | |
| (setq backup-by-copying t) | |
| ;; elpa.gnu.org | |
| ;; ack, yasnippet-0.6.1(安装低版本以解决与auto-complete冲突),popup,auto-complete | |
| (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. | |
| '(ecb-options-version "2.40")) | |
| (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. | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment