Restore ctl+v Visual mode settings for Gvim

Source: Internet
Author: User
Tags diff

Set nocompatible
SOURCE $VIMRUNTIME/vimrc_example.vim
"Source $VIMRUNTIME/mswin.vim(Note this line)
Behave 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
Endfunction

Restore ctl+v Visual mode settings for Gvim

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.