Back up Vim configurations

Source: Internet
Author: User

Source $ vimruntime/vimrc_example.vim
Source $ vimruntime/mswin. Vim
Behave mswin

Map <F2> :! Python % <CR>

Set diffexpr = mydiff ()
Set fileencodings = UTF-8, Chinese, Latin-1, cp936, gb2312
Set fenc = UTF-8
Set tabstop = 4
Set shiftwidth = 4
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

Back up Vim configurations

Related Article

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.