日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

我现在的vimrc配置文件

發布時間:2023/11/27 生活经验 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 我现在的vimrc配置文件 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
我現在的vimrc配置文件
runtime! debian.vim
"設置編碼
set encoding=utf-8
set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936
set fileencodings=utf-8,ucs-bom,chinese"語言設置
set langmenu=zh_CN.UTF-8"
command WQ wq
command Wq wq
command W  w
command Q  q
map <F5> i(<Esc>ea)<Esc>
map <F8> oprintf("bug!here is a bug!!!!\n");<Esc>
map <F4> <Esc>:wq<cr>
map <F7> oprintf("------------------------------------------------------------\n");<Esc>"設置語法高亮
syntax enable
"syntax on"設置配色方案
"colorscheme torte"可以在buffer的任何地方使用鼠標
set mouse=a
set selection=exclusive
set selectmode=mouse,key"高亮顯示匹配的括號
set showmatch"去掉vi一致性
set nocompatible"設置縮進
set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoindent
set cindent
if &term=="xterm"set t_Co=8set t_Sb=^[[4%dmset t_Sf=^[[3%dm
endif"打開文件類型自動檢測功能
filetype on"設置taglist
let Tlist_Show_One_File=0   "顯示多個文件的tags
let Tlist_File_Fold_Auto_Close=1 "非當前文件,函數列表折疊隱藏
let Tlist_Exit_OnlyWindow=1 "在taglist是最后一個窗口時退出vim
let Tlist_Use_SingleClick=1 "單擊時跳轉
let Tlist_GainFocus_On_ToggleOpen=1 "打開taglist時獲得輸入焦點
let Tlist_Process_File_Always=1 "不管taglist窗口是否打開,始終解析文件中的tag"  minibufexplorer
let g:miniBufExplMapWindowNavVim=1
let g:miniBufExplMapWindowNavArrows=1
let g:miniBufExplMapCTabSwitchBufs=1
let g:miniBufExplModSelTarget=1
let g:miniBufExplMoreThanOne=0"
"設置WinManager插件
let g:winManagerWindowLayout='FileExplorer|TagList'
nmap wm :WMToggle<cr>
map <silent> <F9> :WMToggle<cr> "將F9綁定至WinManager,即打開WimManager"設置CSCOPE
set cscopequickfix=s-,c-,d-,i-,t-,e- "設定是否使用quickfix窗口顯示cscope結果"設置Grep插件
nnoremap <silent> <F3> :Grep<CR>"設置自動補全
"filetype plugin indent on   "打開文件類型檢測
set completeopt=longest,menu "關掉智能補全時的預覽窗口"啟動vim時如果存在tags則自動加載
if exists("tags")set tags=./tags
endif"設置按F12就更新tags的方法
map <F12> :call Do_CsTag()<CR>
nmap <C-@>s :cs find s <C-R>=expand("<cword>")<CR><CR>:copen<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>:copen<CR>
nmap <C-@>t :cs find t <C-R>=expand("<cword>")<CR><CR>:copen<CR>
nmap <C-@>e :cs find e <C-R>=expand("<cword>")<CR><CR>:copen<CR>
nmap <C-@>f :cs find f <C-R>=expand("<cfile>")<CR><CR>:copen<CR>
nmap <C-@>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>:copen<CR>
nmap <C-@>d :cs find d <C-R>=expand("<cword>")<CR><CR>:copen<CR>
function Do_CsTag()let dir = getcwd()if filereadable("tags")if(g:iswindows==1)let tagsdeleted=delete(dir."\\"."tags")elselet tagsdeleted=delete("./"."tags")endifif(tagsdeleted!=0)echohl WarningMsg | echo "Fail to do tags! I cannot delete the tags" | echohl Nonereturnendifendifif has("cscope")silent! execute "cs kill -1"endifif filereadable("cscope.files")if(g:iswindows==1)let csfilesdeleted=delete(dir."\\"."cscope.files")elselet csfilesdeleted=delete("./"."cscope.files")endifif(csfilesdeleted!=0)echohl WarningMsg | echo "Fail to do cscope! I cannot delete the cscope.files" | echohl Nonereturnendifendifif filereadable("cscope.out")if(g:iswindows==1)let csoutdeleted=delete(dir."\\"."cscope.out")elselet csoutdeleted=delete("./"."cscope.out")endifif(csoutdeleted!=0)echohl WarningMsg | echo "Fail to do cscope! I cannot delete the cscope.out" | echohl Nonereturnendifendifif(executable('ctags'))"silent! execute "!ctags -R --c-types=+p --fields=+S *"
            silent! execute "!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q ."endifif(executable('cscope') && has("cscope") )if(g:iswindows!=1)silent! execute "!find . -name '*.h' -o -name '*.c' -o -name '*.cpp' -o -name '*.java' -o -name '*.cs' > cscope.files"elsesilent! execute "!dir /s/b *.c,*.cpp,*.h,*.java,*.cs >> cscope.files"endifsilent! execute "!cscope -b"execute "normal :"if filereadable("cscope.out")execute "cs add cscope.out"endifendif
endfunction"設置默認shell
set shell=bash"設置VIM記錄的歷史數
set history=400"設置當文件被外部改變的時侯自動讀入文件
if exists("&autoread")set autoread
endif"設置ambiwidth
set ambiwidth=double"設置文件類型
set ffs=unix,dos,mac"設置增量搜索模式
set incsearch"設置靜音模式
set noerrorbells
set novisualbell
set t_vb="不要備份文件
set nobackup
set nowb
set nu"讓狀態欄一致保留在命令行上方
function! CurDir()let curdir = substitute(getcwd(), $HOME, "~", "g")return curdir
endfunction
set laststatus=2
set statusline=[%n]\ %f%m%r%h\ \|\ \ pwd:\ %{CurDir()}\ \ \|\ go!go!go!baochunzhiexecute pathogen#infect()
syntax on
filetype plugin indent on   "打開文件類型檢測"Grep插件
nnoremap <silent> <F3> :Grep<CR>

?

posted on 2015-08-06 23:03 symons 閱讀(...) 評論(...) 編輯 收藏

轉載于:https://www.cnblogs.com/symons1992/p/4709442.html

總結

以上是生活随笔為你收集整理的我现在的vimrc配置文件的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。