日期:2014-05-16 浏览次数:21025 次
//taglist let Tlist_Show_One_File=1 let Tlist_Exit_OnlyWindow=1 //WinManager let g:winManagerWindowLayout='FileExplorer|TagList' nmap wm :WMToggle<cr> //Buffer let g:miniBufExplMapCTabSwitchBufs=1 let g:miniBufExplMapWindowNavVim=1 // Cscope set cscopequickfix=s-,c-,d-,i-,t-,e- cs add /opt/29XXNR/nr288/user/cscope.out /opt/29XXNR/nr288/user nmap <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> // A.vim nnoremap <silent> <F12> :A<CR> //Grep nnoremap <silent> <F3> :Grep<CR> // tag set completeopt=longest,menu set tags= /dir/tags // add line number set nu
" 显示行号 set number " 设置缩进 set tabstop=4 set shiftwidth=4 set autoindent set cindent " 设置高亮 syntax enable syntax on set hlsearch nmap <f2> :noh<cr> " 设置ctags、cscope和TagList set tags=tags; set autochdir set cscopequickfix=s-,c-,d-,i-,t-,e- let Tlist_Ctags_Cmd = '/usr/bin/ctags' let Tlist_Show_One_File=1 let Tlist_Exit_OnlyWindow=1 " 设置WinManager let g:winManagerWindowLayout='FileExplorer|TagList' nmap mw :WMToggle<cr> " 设置自动补齐 filetype plugin indent on "set completeopt=longest,menu " 设置OmniCppComplete " ctags 索引文件 (根据已经生成的索引文件添加即可, 这里我额外添加了 hge 和 curl的索引文件) set tags+=~/.vim/clib set tags+=~/.vim/cpplib set tags+=~/.vim/linuxlib " OmniCppComplete let OmniCpp_NamespaceSearch = 1 let OmniCpp_GlobalScopeSearch = 1 let OmniCpp_ShowAccess = 1 let OmniCpp_ShowPrototypeInAbbr = 1 " 显示函数参数列表 let OmniCpp_MayCompleteDot = 1 " 输入 . 后自动补全 let OmniCpp_MayCompleteArrow = 1 " 输入 -> 后自动补全 let OmniCpp_MayCompleteScope = 1 " 输入 :: 后自动补全 let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"] " 自动关闭补全窗口 au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif set completeopt=menuone,menu,longest
------解决方案--------------------
精辟