Saturday, November 16, 2013

Re: vim -d(iff) file1 file2 -- diff args?


On Nov 16, 2013 12:25 PM, "Tony Mechelynck" <antoine.mechelynck@gmail.com> wrote:
>
> On 16/11/13 06:25, Nikolay Pavlov wrote:
>>
>>
>> On Nov 16, 2013 9:17 AM, "Linda W" <vim@tlinx.org
>> <mailto:vim@tlinx.org>> wrote:
>>  >
>>  > in mgdiff, you can specify a mgdiff --args "-w..." file1 file2
>>  > to allow you to pass most args you'd want to mgdiff.
>>  >
>>  > Is there something similar with vim?
>>  > Like sometimes I'd like it to ignore differences in whitespace
>>  > as an example.
>>
>> :h 'diffopt'. You can use "-c 'set diffopt+=iwhite'" to specify this
>> option at the command-line, but it may be too late. Specifying it in the
>> vimrc will not, but it is not convenient, thus you may want to use
>> something like
>>
>>      if !empty('$VIMDIFFOPT')
>>          let &diffopt=$VIMDIFFOPT
>>      endif
>>
>> that enables taking this option from environment variable VIMDIFFOPT.
>
>
> In case -c is too late, you can use instead
>
>         vimdiff --cmd "set diffopt+=iwhite" file1 file2
>
> which will add the "iwhite" entry to the 'diffopt' option before processing your vimrc. The difference between -c and --cmd is the difference between "late" and "early" customization.

Only if vimrc does not contain diffopt setting in "strict" variant (=smth). My does.

>>
>>  > Thanks or RFE?
>>  >
>
>
> You're welcome. For details, see
>
>         :help 'diffopt'
>         :help -c
>         :help --cmd
>
> Best regards,
> Tony.
> --
> "Go ahead and hate your neighbor, go ahead and cheat a friend
>  Do it in the name of heaven - you can justify it in the end."
>               [From One Tin Soldier]
>
>
>
> --
> --
> You received this message from the "vim_use" 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
>
> --- You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

--
--
You received this message from the "vim_use" 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
 
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: