On Thu, 2011-03-17 at 14:33 -0700, Ben Fritz wrote:
>
> I know for quite some time, the diffexpr given in vimrc_example.vim
> (or wherever it is given in the default cream setup) is broken on
> Windows. Perhaps it still is broken?

First I've heard. Can we not start distributing .vimrc and _vimrc
instead of relying on the installer to create these?

Below is the _vimrc generated by the Cream installer, taken from Vim's
installer years ago. If someone can point out how it differs from the
current Vim default, I'll fix it.

--
Steve Hall  [ digitect dancingpaper com ]


---------------------------------------------------------------------
  1:set nocompatible
  2:source $VIMRUNTIME/vimrc_example.vim
  3:source $VIMRUNTIME/mswin.vim
  4:behave mswin
  5:
  6:set diffexpr=MyDiff()
  7:
  8:function MyDiff()
  9:  let opt = '-a --binary '
 10:  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
 11:  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
 12:  let arg1 = v:fname_in
 13:  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
 14:  let arg2 = v:fname_new
 15:  if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
 16:  let arg3 = v:fname_out
 17:  if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
 18:  let eq = ''
 19:  if $VIMRUNTIME =~ ' '
 20:    if &sh =~ '\<cmd'
 21:      let cmd = '"' . $VIMRUNTIME . '\diff"'
 22:      let eq = '""'
 23:    else
 24:      let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
 25:    endif
 26:  else
 27:    let cmd = $VIMRUNTIME . '\diff'
 28:  endif
 29:  silent execute '!'.cmd.' '.opt.arg1.' '.arg2.' > '.arg3.eq
 30:endfunction
---------------------------------------------------------------------


-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui