Current vimrc

来源:互联网 发布:qt creator linux 编辑:程序博客网 时间:2024/05/17 00:53
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 =~ '\<cmd'"      let cmd = '""' . $VIMRUNTIME . '\diff"'"      let eq = '"'"    else"      let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'"    endif"  else"    let cmd = $VIMRUNTIME . '\diff'"  endif"  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . 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 <silent> <leader>ee :e $MYVIMRC<cr>"source vimrcmap <silent> <leader>ss :so $MYVIMRC<cr>"cs a F:\VimRef\cscope-15.8\src\cscope.out"vimManagerWindowlet g:winManagerWindowLayout='FileExplorer|TagList'nmap wm :WMToggle<cr>"in insert mode, insert the current file name without th.imap <leader>fn <c-r>=expand('%:t:r')<cr>"窗口分割时,进行切换的按键热键需要连接两次,比如从下方窗口移动"光标到上方窗口,需要<c-w><c-w>k,非常麻烦,现在重映射为<c-k>,切换的"时候会变得非常方便.nnoremap <C-h> <C-w>hnnoremap <C-j> <C-w>jnnoremap <C-k> <C-w>knnoremap <C-l> <C-w>l"cscope"<C-_> Ctrl和下划线组合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>"查找函数调用nmap F :cs f c <C-R><C-W><CR>"查找符号nmap S :cs f s<C-R><C-W><CR>"使用"ctrl+空格" 查找时就会使vim水平分隔窗口,结果显示在 新的窗口中"nmap <C-Space>s :scs find s <C-R>=expand("<cword>")<CR><CR>    "nmap <C-Space>g :scs find g <C-R>=expand("<cword>")<CR><CR>    "nmap <C-Space>c :scs find c <C-R>=expand("<cword>")<CR><CR>    "nmap <C-Space>t :scs find t <C-R>=expand("<cword>")<CR><CR>    "nmap <C-Space>e :scs find e <C-R>=expand("<cword>")<CR><CR>    "nmap <C-Space>f :scs find f <C-R>=expand("<cfile>")<CR><CR>    "nmap <C-Space>i :scs find i <C-R>=expand("<cfile>")<CR><CR>    "nmap <C-Space>d :scs find d <C-R>=expand("<cword>")<CR><CR>

0 0
原创粉丝点击