本文共 2227 字,大约阅读时间需要 7 分钟。
set nocompatiblesource $VIMRUNTIME/vimrc_example.vimsource $VIMRUNTIME/mswin.vimbehave mswin"set diffexpr=MyDiff()"function MyDiff()" let opt = '-a --binary '" if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif" if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif" let arg1 = v:fname_in" if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif" let arg2 = v:fname_new" if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif" let arg3 = v:fname_out" if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif" let eq = ''" if $VIMRUNTIME =~ ' '" if &sh =~ '\' . arg3 . eq"endfunctioncolo elflord"set nuset guioptions-=mset guioptions-=Tset guioptions-=rset sw=4set ts=4set autoindentset nobackupset guifont=courier_new:h18:b"leader 设置为","let mapleader = ",""以最大化打开au guiEnter * simalt ~x"光标所在行高亮set cursorline "用中文显示帮助"set helplang=cn set fencs=utf-8,cp936set tags=tagsset autochdirset laststatus=2 " 显示状态栏 (默认值为 1, 无法显示状态栏)set statusline=\ %<%F[%1*%M%*%n%R%H]%=\ %y\ %0(%{&fileformat}\ %{&encoding}\ %c:%l/%L%)\ "let b:tablify_headerDelimiter = '*'"let b:tablify_horHeaderDelimiter = '-'"When no beep or flash is wanted, i don't like the f*** beep"set vb t_vb="edit vimrcmap ee :e $MYVIMRC "source vimrcmap ss :so $MYVIMRC "cs a F:\VimRef\cscope-15.8\src\cscope.out"vimManagerWindowlet g:winManagerWindowLayout='FileExplorer|TagList'nmap wm :WMToggle "in insert mode, insert the current file name without th.imap fn =expand('%:t:r') "窗口分割时,进行切换的按键热键需要连接两次,比如从下方窗口移动"光标到上方窗口,需要 k,非常麻烦,现在重映射为 ,切换的"时候会变得非常方便.nnoremap hnnoremap jnnoremap knnoremap l"cscope" Ctrl和下划线组合 nmap s :cs find s =expand(" ") nmap g :cs find g =expand(" ") nmap c :cs find c =expand(" ") nmap t :cs find t =expand(" ") nmap e :cs find e =expand(" ") nmap f :cs find f =expand(" ") nmap i :cs find i =expand(" ") nmap d :cs find d =expand(" ") "查找函数调用 nmap F :cs f c "查找符号 nmap S :cs f s "使用"ctrl+空格" 查找时就会使vim水平分隔窗口,结果显示在 新的窗口中 "nmap s :scs find s =expand(" ") "nmap g :scs find g =expand(" ") "nmap c :scs find c =expand(" ") "nmap t :scs find t =expand(" ") "nmap e :scs find e =expand(" ") "nmap f :scs find f =expand(" ") "nmap i :scs find i =expand(" ") "nmap d :scs find d =expand(" ")
转载地址:http://opuhj.baihongyu.com/