日期:2014-05-16  浏览次数:20729 次

100求vim的配置
在linux下的第一件让人受挫的就是vim的配置,弄了好久还是不满意,不想在弄了,求一完整的配置。系统为linux
1:包括vimrc,插件等。
2:实现代码补全,缩进等c /c++特性,其他的不用。
3:支持多文件标签显示,
4:代码浏览可以利用tags看函数实现等。
ps:主要是在linux下进行编程使用,越方便越好。

------解决方案--------------------
http://download.csdn.net/source/1423922
------解决方案--------------------
LZ是第二次问这个问题了 看来问题还没有解决
给个邮箱 我可以给你发个文档
------解决方案--------------------
下面是我的:
Python code

syntax enable
set tabstop=4
set backspace=2
set expandtab
set linebreak

set incsearch
set gdefault
set laststatus=2
set ruler

"programe related setting
filetype plugin indent on
set completeopt=longest,menu
syn on
set showmatch
set smartindent
set shiftwidth=4
set autoindent
set ai!

"ctags related setting
"set tags=tags,tagsx
set tags=tags
set tags+=~/.vim/systags

"Taglist related setting
let Tlist_Exit_OnlyWindow=1
let Tlist_GainFocus_On_ToggleOpen=1
let Tlist_Close_On_Select=1
let Tlist_File_Fold_Auto_Close=1
"nmap <F8> :TlistTogg<cr>
nmap <F1> :Tlist<cr>

"nmap <F2> :TlistOpen<cr>

"winmanage related setting
"let g:winManagerWindowLayout='FileExplorer|TagList'
let g:winManagerWindowLayout='FileExplorer'
let g:winManagerWidth=35
let g:defaultExplorer=0
nmap <F2> :WMToggle<cr>

"cscope related setting
if has("cscope")
    set csprg=/usr/bin/cscope
    set cscopequickfix=s-,c-,d-,i-,t-,e-
    set csto=0
    set cst
    set nocsverb
    " add any database in current directory
    if filereadable("cscope.out")
        cs add cscope.out
    " else add database pointed to by environment
    elseif $CSCOPE_DB != ""
        cs add $CSCOPE_DB
    endif
    set csverb
endif
nmap <F4>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <F4>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <F4>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <F4>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <F4>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <F4>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <F4>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <F4>d :cs find d <C-R>=expand("<cword>")<CR><CR>

"minibufer related setting
let g:miniBufExplMapWindowNavVim = 1

"grep related setting
nnoremap <silent> <F3> :Grep<CR>

------解决方案--------------------
ctags -R --c-kinds=+p --fields=+S /path
我是用上面这个命令生成系统跟标准库函数的tags,然后放到~/.vim目录下,然后codecomeplete插件使用这些tags
------解决方案--------------------
自从Vim发布7.0之后, 就开始支持标签或者叫标签页 :tabnew file :tabp :tabn 
ctags+taglist+omni-completion
在src或者下ctags -R就行了
标准库的 /usr/include下 ctags -R 然后把tags挎贝到源目录下
或者在vimrc中加上set tags+=/usr/include/tags