1. The latest code of CVS cedet, and the completion of code 1.04 is very slow.
- CVS-Z3-D: pserver: anonymous@cedet.cvs.sourceforge.net:/cvsroot/cedet Co-P cedet
2. Run the command line
- Touch 'Find-name "makefile" '// (note the left quotation marks)
- Make Bootstrap
3. Run the command line
- G ++-e-v-P dummy. cpp
Many header files will be found. Dummy. cpp is an empty file, and then
4. Add in. emacs
- (Eval-after-load "semantic-c"; E:/Emacs/home is my $ home
- '(Dolist (D (list "/usr/include/C ++/4.1.0"
- "/Usr/include/C ++/4.1.0/x86_64-suse-linux"
- "/Usr/include/C ++/4.1.0/backward"
- "/Usr/local/include"
- "/Usr/lib64/GCC/x86_64-suse-linux/4.1.0/include"
- "/Usr/lib64/GCC/x86_64-suse-linux/4.1.0/.../x86_64-suse-linux/include"
- "/Usr/include"
- ))
- (Semantic-add-system-include D )))
- ; Configure the storage directory of the semantic analysis result file below. Note that this directory must be created by yourself.
- (Setq semanticdb-default-save-directory
- (Expand-file-name "~ /. Emacs. d/semanticdb "))
- ; The directory of the header file has been defined, and some small definitions are made for C-mode:
- (Add-hook 'C-mode-common-hook
- '(Lambda ()
- (Require 'cedet)
- (EDE-minor-mode t)
- ; The following three are ranked by the degree of robustness applicable to machines, with the lowest requirement for machines. Select one from three.
- ; (Semantic-load-enable-gaudy-code-helpers)
- ; (Semantic-load-enable-code-helpers)
- (Semantic-load-enable-minimum-features)
- ; The three buttons are bound to be enabled as per your preferences. Except for the first button that can be modified as your favorite, the other two buttons have no modification significance.
- ; Anyway, the major supplement relies on semantic-complete-analyze-inline. In the future, it will be used to steal and cheat.
- ; Semantic-complete-Self-inset is also called semantic-complete-analyze-inline.
- (Local-set-Key (KBD "M-/") 'semantic-complete-analyze-inline)
- (Local-set-key "." 'semantic-complete-Self-insert)
- (Local-set-key ">" 'semantic-complete-Self-insert)
- (C-toggle-auto-hungry-state 1)
- (C-set-style "K & R ")))
OK. You can try it in the code. M-/completion, or input. Or-> after the struct, the code is prompted, which is very convenient.
Reference:
Http://www.linuxforum.net/forum/showflat.php? Cat = & board = Vim & number = 687565 & page = 0 & view = collapsed & SB = 5 & O = 0 & fpart =