標籤:des style color 使用 io strong 檔案 ar
記錄以下我的vim的外掛程式
1.ctags
使用命令ctags -R
2.cscope
目前還沒怎麼使用
3.Toglist
4.winmanager
5.pathogen
6.nerdtree
附:
我的.vimrc
"
"my vim configuration
"
" 關閉compatible
set nocompatible
" 開啟文法高亮
syntax on
" 設定文字編碼自動識別
set fencs=gbk,utf-8,ucs-bom,gb18030,gb2312,cp936
" 使用滑鼠
set mouse=a
" 設定高亮搜尋
set hlsearch
" 輸入字串就顯示匹配點
set incsearch
" 輸入的命令顯示出來,看的清楚些。
set showcmd
set background=dark
set history=900 "記錄900條
filetype plugin indent on "開啟檔案類型檢測
set completeopt=longest,menu "關閉智能補全時的預覽視窗
"顏色方案
colorscheme desert "desert顏色方案
"介面設定.
set ruler "顯示當前位置
set number "顯示行號
"set nonumber "不顯示行號
"格式設定.
set autoindent "自動縮排
set smartindent "智慧縮排
set cindent "C縮排
set tabstop=4 "硬TAB
set softtabstop=4 "軟TAB
set shiftwidth=4 "縮排空格數
set expandtab "空格替換TAB
"set smarttab "智能TAB
set tags=tags; "ctags
set autochdir "ctags
" TagList"
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
let Tlist_Use_Left_Window = 1
" BufExplorer"
let g:bufExplorerDefaultHelp=0
let g:bufExplorerShowRelativePath=1
let g:bufExplorerSortBy=‘mru‘
let g:bufExplorerSplitRight=0
let g:bufExplorerSplitVertical=1
let g:bufExplorerSplitVertSize = 30
autocmd BufWinEnter /[Buf/ List/] setl nonumber
" winManager setting"
let g:winManagerWindowLayout = "FileExplorer,BufExplorer|TagList"
let g:winManagerWidth = 30
let g:defaultExplorer = 0
map <span style="color: #00FF00;"><f12></span> :WMToggle<cr>
imap <span style="color: #00FF00;"><f12></span> <esc><f12>a
nmap <C-W><C-F> :FirstExplorerWindow<cr>
nmap <C-W><C-B> :BottomExplorerWindow<cr>
nmap <silent> <leader>wm :WMToggle<cr>
nmap <silent> <leader>wu :wa<cr>:TlistUpdate<cr>:FirstExplorerWindow<cr>
" lookupfile setting"
let g:LookupFile_MinPatLength = 2
let g:LookupFile_PreserveLastPattern = 0
let g:LookupFile_PreservePatternHistory = 1
let g:LookupFile_AlwaysAcceptFirst = 1
let g:LookupFile_AllowNewFiles = 0
if filereadable("./filenametags")
let g:LookupFile_TagExpr = ‘"./filenametags"‘
endif
nmap <silent> <leader>lk :LUTags<cr>
nmap <silent> <leader>ll :LUBufs<cr>
nmap <silent> <leader>lw :LUWalk<cr>
" cscope setting"
set cscopequickfix=s-,c-,d-,i-,t-,e-
nmap <F6>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <F6>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <F6>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <F6>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <F6>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <F6>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <F6>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <F6>d :cs find d <C-R>=expand("<cword>")<CR><CR>
" 程式碼摺疊功能
set foldmethod=syntax
set foldlevel=100 " 啟動 vim 時不要自動摺疊代碼
" superTab
let g:SuperTabRetainCompletionType=2
let g:SuperTabDefaultCompletionType="<C-X><C-O>"
" ctags_highlighting
let b:TypesFileRecurse = 1
let b:TypesFileDoNotGenerateTags = 1
let b:TypesFileIncludeLocals = 1
"let b:TypesFileIncludeSynMatches =1
"let b:TypesFileLanguages = [‘c‘]
" Fn 快速鍵
" F5 - LookUpFile, F6 - cscope
nnoremap <silent> <F7> :WMToggle<CR> “(注意冒號前面需要有個空格奧)
nnoremap <silent> <F8> :A<CR>
set nocompatible
"pathogen
call pathogen#infect()
call pathogen#helptags()
" 設定NerdTree
map <F3> :NERDTreeMirror<CR>
map <F3> :NERDTreeToggle<CR>