[关闭]
@zzzc18 2017-10-25T07:35:57.000000Z 字数 849 阅读 1091

Vim

else


  1. source $VIMRUNTIME/vimrc_example.vim
  2. source $VIMRUNTIME/mswin.vim
  3. behave mswin
  4. set diffexpr=MyDiff()
  5. function MyDiff()
  6. let opt = '-a --binary '
  7. if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  8. if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  9. let arg1 = v:fname_in
  10. if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
  11. let arg2 = v:fname_new
  12. if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
  13. let arg3 = v:fname_out
  14. if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
  15. if $VIMRUNTIME =~ ' '
  16. if &sh =~ '\<cmd'
  17. if empty(&shellxquote)
  18. let l:shxq_sav = ''
  19. set shellxquote&
  20. endif
  21. let cmd = '"' . $VIMRUNTIME . '\diff"'
  22. else
  23. let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
  24. endif
  25. else
  26. let cmd = $VIMRUNTIME . '\diff'
  27. endif
  28. silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
  29. if exists('l:shxq_sav')
  30. let &shellxquote=l:shxq_sav
  31. endif
  32. endfunction
  33. set number
  34. colorscheme slate
  35. set gfn=Consolas:h18
  36. map <F9> :w<CR> :!g++ % -o %< -g -gstabs+ <CR><CR>
  37. map <F10> :!%<.exe<CR><CR>
  38. map <F5> :w<CR> :!gdb %< -q <CR><CR>
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注