Backup. emacs

Source: Internet
Author: User

; Color
(Set-face-Background 'default "black ")
(Set-face-foreground 'default "gray ")

; Cmake
(Require 'cmake-mode)
(Setq auto-mode-alist
(Append
'("Cmakelists \. txt \'". cmake-mode ))
'("\. Cmake \'". cmake-mode ))
Auto-mode-alist ))

(Require 'cedet)
(Global-Ede-mode t)

; Enable default Function
(Semantic-mode 1)

; Enable semantic idle complete
(Global-semantic-idle-completions-mode)
(Setq semantic-complete-inline-analyzer-idle-displayor-class 'semantic-displayor-traditional)

; Enable semantic idle summary Mode
(Global-semantic-idle-Summary-mode)

; Set the way of semantic search
(Setq-mode-Local C ++-Mode
Semanticdb-find-default-Throttle
'(File Project local unloaded system recursive ))

(Setq-mode-Local C-Mode
Semanticdb-find-default-Throttle
'(File Project local unloaded system recursive ))

; Higlight fun
(Global-semantic-Highlight-func-mode)

; Decoration Mode
(Global-semantic-Decoration-mode)
(Setq semantic-toggle-Decoration-style 'semantic-tag-boundary)

; Speedbar
(Require 'semantic/SB)
(Speedbar)

; MRU bookmark
(Global-semantic-MRU-bookmark-mode)

; Sticky func Mode
(Global-semantic-stickyfunc-mode)

; Imenu tag
(Defun my-semantic-hook () (imenu-add-to-menubar "tags "))
(Add-hook 'semantic-init-hooks' my-semantic-hook)

; Semantic qt4 support
(Setq qt4-base-dir "/opt/qtomap/usr/include ")
(Setq qt4-gui-dir (Concat qt4-base-dir "/qtgui "))
(Semantic-add-system-include qt4-base-dir 'C ++-mode)
(Semantic-add-system-include "/opt/qtomap/usr/include/qtcore" 'C ++-mode)
(Semantic-add-system-include qt4-gui-dir 'C ++-mode)
(Semantic-add-system-include "/opt/qtomap/usr/include/qtnetwork" 'C ++-mode)
(Add-to-list 'auto-mode-alist (cons qt4-base-dir 'C ++-mode ))
(Setq semantic-Lex-C-Preprocessor-symbol-File '())
(Add-to-list 'semantic-Lex-C-Preprocessor-symbol-file (Concat qt4-base-dir "/QT/qconfig. H "))
(Add-to-list 'semantic-Lex-C-Preprocessor-symbol-file (Concat qt4-base-dir "/QT/qconfig-large.h "))
(Add-to-list 'semantic-Lex-C-Preprocessor-symbol-file (Concat qt4-base-dir "/QT/qglobal. H "))
(Setq semantic-Lex-C-Preprocessor-symbol-map '())
(Add-to-list 'semantic-Lex-C-Preprocessor-symbol-map' ("q_gui_export ".""))
(Add-to-list 'semantic-Lex-C-Preprocessor-symbol-map' ("q_core_export ".""))

; Add c ++ include
(Semantic-add-system-include "/usr/include/C ++/4.5" 'C ++-mode)
(Add-to-list 'auto-mode-alist (Cons "/usr/include/C ++" 'C ++-mode ))
(Add-to-list 'semantic-Lex-C-Preprocessor-symbol-map' ("_ nonnull ".""))

; Semantic database location
(Setq semanticdb-default-save-directory
(Expand-file-name "~ /. Emacs. d/semanticdb "))

; C-mode-hooks.
(Defun Skype-mode-keys ()
(Local-set-key "." 'semantic-complete-Self-insert)
(Local-set-key ">" 'semantic-complete-Self-insert)
)

(Defun Skype-mode-Toggle ()
(C-toggle-auto-newline)
; (Setq C-offsets-alist '(substatement-open. 0); Set substatement no add space if {}
)

(Add-hook 'C ++-mode-hook 'pc3-mode-keys)
(Add-hook 'C-mode-hook' Py-mode-keys)
(Add-hook 'C ++-mode-hook 'py-mode-Toggle)
(Add-hook 'C-mode-hook' Py-mode-Toggle)

; Setup GDB
(Setq GDB-embedded-Windows 1)
(Defun mygdb-mode-hook ()
(Gud-tooltip-mode)
)

(Add-hook 'gdb-mode-hook 'mygdb-mode-hook)

(Setq X-select-enable-clipboard t );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.