""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Use Vim settings, rather than Vi settings (much better!). " This must be first, because it changes other options as a side effect. set nocompatible """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" if (has("win32") || has("win64")) source $VIMRUNTIME/mswin.vim behave mswin set gfn=Bitstream/ Vera/ Sans/ Mono:h10 nmap <C-S-c> :tabnew C:/Program/ Files/Vim/_vimrc<CR> "nmap <C-S-c> :tabnew C:/Vim/_vimrc<CR> else "打開配置文件 nmap <C-S-c> :tabnew $HOME/.vimrc<CR> endif if (has("gui_running")) set lines=45 set columns=110 set go-=m "去掉菜單欄 set go-=T "去掉工具欄 endif """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" "標籤頁欄中去除當前所編輯文件的路徑信息,只保留文件名 function ShortTabLabel () let bufnrlist = tabpagebuflist (v:lnum) let label = bufname (bufnrlist[tabpagewinnr (v:lnum) -1]) let filename = fnamemodify (label, ':t') return filename endfunction set guitablabel=%{ShortTabLabel()} colo evening syntax on filetype plugin indent on au BufWinLeave *.ztx mkview au BufWinEnter *.ztx silent loadview au BufNewFile,BufRead *.tx1 setf tx1 " 字符編碼 set fencs=ucs-bom,utf-8,gb18030,gbk,gb2312,cp936,big5,euc-jp,euc-kr,latin1 set ambiwidth=double "支持unix和dos格式的換行方式,默認爲unix set ffs=unix,dos ff=unix set magic set ru "標尺信息 set ai set si "Smart indet set wrap "Wrap lines set linebreak "在空白或標點符的地方折行,避免將一個英文字折成兩半 set incsearch set sw=4 set ts=4 set dy=lastline "顯示最多行,不用@@ set backspace=indent,eol,start set nobackup set hlsearch set showmatch set showcmd set mouse=a """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" "退出 nmap <C-F4> :q<CR> "設置用Shift+Left與Shift+Right來切換標籤頁 map <S-Left> :bp<CR> map <S-Right> :bn<CR> "在新標籤頁打開文件 nmap <C-S-n> :tabnew "標籤頁設置 "設置用Ctrl+Left與Ctrl+Right來切換標籤頁 map <C-Left> :tabp<CR> map <C-Right> :tabn<CR> """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" "插件設置 "1. winmanager let g:winManagerWindowLayout='FileExplorer,TagsExplorer|BufExplorer' map <C-w><C-b> :BottomExplorerWindow<cr> map <C-w><C-f> :FirstExplorerWindow<cr> map <C-w><C-t> :WMToggle<cr> "2. txtbrowser let tlist_txt_settings = 'txt;c:content;f:figures;t:tables' au BufRead,BufNewFile *.txt setlocal ft=txt |
我的.vimrc
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.