Recently due to various reasons, the IDE from the source insight into vim, referring to a lot of blog articles, tossing a long time to toss a general appearance, now summarize experience:
Main references:
Transform Vim into source insight
Construction of GVIM programming environment under WinXP
Vim Learning Note folding (Fold)
:
1. Installation:
Download gvim8.0 to install it.
It's just like this:
2. Plug-in Installation:
The following table is the selected plugin
Plug-in Name |
Role |
|
Installation Method (VIMRC is configured later) |
TagList |
TagList based on the Ctags |
http://www.vim.org/scripts/script.php?script_id=273 |
Unzip to the. \vim80 directory below |
Winmanager |
Integrating Fileexplore and TagList |
Http://www.vim.org/scripts/script.php?script_id=95 |
Unzip to the. \vim80 directory below |
Ctags |
Ctags, used to generate the tag file (symbolic link) |
Http://ctags.sourceforge.net |
Place the Ctags.exe under the. \vim80 path and add Vim80 to the environment variable/ctags.exe to the system32 path |
Snipmate |
Provides quick input of common Code (tab completion) |
http://www.vim.org/scripts/script.php?script_id=2540 |
Unzip to the. \vimfiles directory below |
Supertab |
Automatic Completion with TAB key |
http://www.vim.org/scripts/script.php?script_id=1643 |
Open the file in Vim ($ vim supertab.vmb) Source the file (: so%) |
Srcexpl |
Features of the preview box that implements the source insight |
http://www.vim.org/scripts/script.php?script_id=2179 |
Unzip to the. \vimfiles directory below |
Cscope |
Ctags's enhanced version, not only can generate source tag can also generate call tag |
http://sourceforge.net/projects/mslk/files/ |
Unzip the compressed package and add the directory to the environment variable path |
3. Theme Installation:
Vim Theme Selection Monokai, font selection Consolas
Theme Address: Https://github.com/sickill/vim-monokai
Change the file name to Monokai.vim and put it in vim80\colors\.
Some changes of personal preference: (Modify to Monokai.vim corresponding line)
Hi Search term=reverse cterm=none ctermfg=231 ctermbg=24 gui=none guifg= #f8f8f2 guibg= #AA0000hi Folded ctermfg=242 CTERMB g=235 cterm=none guifg= #75715e guibg= #272822 gui=nonehi foldcolumn ctermfg=242 ctermbg=235 cterm=none guifg= #75715e guibg= #272822 Gui=none
4.VIMRC changes:
After the _VIMRC file, add the following:
"Set Taglistlet tlist_show_one_file=1let tlist_exit_onlywindow=1" open taglist with F8 "Nmap <F8>: TLISTTOGGLE<CR > "Use F8 to open Wimmanager (fileexplorer+taglist) let g:winmanagerwindowlayout= ' fileexplorer| TagList ' nmap <F8>:wmtoggle<cr> ' use F9 to open Srcexplnmap <F9>: Srcexpltoggle<cr>let g:srcexpl_ Jumpkey = ' <ENTER> let G:srcexpl_gobackkey = ' <SPACE> ' let G:srcexpl_prevdefkey = ' <F3> ' let G:srcexpl_ Nextdefkey = "<F4>" "Set supertab, tab to open the Cppcomplet auto-completion function. Let G:supertabretaincompletiontype=2let g:supertabdefaultcompletiontype= "<C-X><C-O>" "Show line Numbers set number" Set theme face font ColorScheme monokaiset Guifont=consolas:h12 "To use smart completion, open file type detection, turn off VI compatibility mode filetype plugin indent onset NOCP" Character match Word set Incsearch "code folding set Fdm=syntaxset foldlevel=1set foldcolumn=2
Press F9 to open the source Explore,f8 open WindowManager
Cscope settings: (I didn't use it)
See: Http://cscope.sourceforge.net/cscope_maps.vim
"Cscopenmap <c-\>s:cs find S <c-r>=expand (" <cword> ") <cr><cr>nmap <c-\>g:cs Find G <c-r>=expand ("<cword>") <cr><cr>nmap <c-\>c:cs find C <c-r>=expand ("<cword > ") <cr><cr>nmap <c-\>t:cs find T <c-r>=expand (" <cword> ") <cr><cr>nmap <c-\>e:cs Find e <c-r>=expand ("<cword>") <cr><cr>nmap <c-\>f:cs find F <C-R> =expand ("<cfile>") <cr><cr>nmap <c-\>i:cs Find I ^<c-r>=expand ("<cfile>") <CR >$<cr>nmap <c-\>d:cs Find D <c-r>=expand ("<cword>") <CR><CR>
5. Some other settings:
tags are generated (although the source explore supports updates every time the call is opened, but if the first time you open no tags will be generated in the current directory, if you open the project internal files will cause tags incomplete, so first run best to generate a bit)
Ctags-r./drvlib./source./include
Cscope database generation (path changed to own)
Find-p./drvlib/source./include > CSCOPE.FILESCSCOPE-BQ
Cscope database contains (path changed to own)
Cscope Add: \cscope.out
gvim8.0 compiler configuration under Windows