Advertisement
Guest User

Untitled

a guest
Dec 18th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. set diffexpr=MyDiff()
  2. function MyDiff()
  3. let opt = '-a --binary '
  4. if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  5. if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  6. let arg1 = v:fname_in
  7. if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
  8. let arg2 = v:fname_new
  9. if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
  10. let arg3 = v:fname_out
  11. if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
  12. if $VIMRUNTIME =~ ' '
  13. if &sh =~ '\<cmd'
  14. if empty(&shellxquote)
  15. let l:shxq_sav = ''
  16. set shellxquote&
  17. endif
  18. let cmd = '"' . $VIMRUNTIME . '\diff"'
  19. else
  20. let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
  21. endif
  22. else
  23. let cmd = $VIMRUNTIME . '\diff'
  24. endif
  25. silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
  26. if exists('l:shxq_sav')
  27. let &shellxquote=l:shxq_sav
  28. endif
  29. endfunction
  30.  
  31.  
  32. set number
  33. set noundofile
  34. syntax on
  35. set softtabstop=3
  36. set autoindent
  37. filetype plugin indent on
  38. " show existing tab with 4 spaces width
  39. set tabstop=4
  40. " when indenting with '>', use 4 spaces width
  41. set shiftwidth=4
  42. " On pressing tab, insert 4 spaces
  43. set expandtab
  44. set cc=80
  45. hi ColorColumn ctermbg=darkblue guibg=darkblue
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement