Cygwin上的Git错误,从未见过,全新安装

时间:2017-03-23 20:40:11

标签: vim cygwin

我今天刚刚重新格式化了我的操作系统硬盘,彻底清除了所有软件,全新安装(我喜欢这样做!)。

在我重新安装Cygwin时,一切都很好,除了以下问题:

Cygwin-Git问题 (上一篇:git init,git add *)

    Justin@DESKTOP-Q66GK39 /cygdrive/c/ti/lib/jmrTemp
    $ git commit
    Error detected while processing /usr/share/vim/vim80/defaults.vim:
    line  100:
    E10: \ should be followed by /, ? or &
    line  101:
    E10: \ should be followed by /, ? or &
    line  102:
    E10: \ should be followed by /, ? or &
    line  114:
    E10: \ should be followed by /, ? or &
    Press ENTER or type command to continue

错误代码来源

#vim80/defaults.vim:99-102
    autocmd BufReadPost *
      \ if line("'\"") >= 1 && line("'\"") <= line("$") |
      \   exe "normal! g`\"" |
      \ endif

#vim80/defaults.vim:112-114
    if !exists(":DiffOrig")
      command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
              \ | wincmd p | diffthis

问题

  1. 这些错误来自哪里?
  2. 如何更正或删除这些错误?

2 个答案:

答案 0 :(得分:2)

解决此问题的最简单方法是修改相关文件,使用“标准”行继续方法,该方法是 end 处的➜ logger git:(master) ✗ xcrun swiftc -emit-library -sdk $(xcrun --show-sdk-path --sdk appletvsimulator10.1) main.swift <unknown>:0: warning: using sysroot for 'AppleTVSimulator' but targeting 'MacOSX' ld: warning: URGENT: building for OSX, but linking against dylib (/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator10.1.sdk/System/Library/Frameworks//CoreFoundation.framework/CoreFoundation) built for tvOS. Note: This will be an error in the future. ld: warning: URGENT: building for OSX, but linking against dylib (/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator10.1.sdk/usr/lib/libobjc.dylib) built for tvOS. Note: This will be an error in the future. ld: warning: URGENT: building for OSX, but linking against dylib (/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator10.1.sdk/usr/lib/libSystem.dylib) built for tvOS. Note: This will be an error in the future. 字符继续(而这个文件试图在第2行的开头处以\的替代方式进行操作)

示例:

\

应改为:

#vim80/defaults.vim:99-102
autocmd BufReadPost *
  \ if line("'\"") >= 1 && line("'\"") <= line("$") |
  \   exe "normal! g`\"" |
  \ endif

答案 1 :(得分:1)

放下多行......呃:)!

这是我的工作副本:

解决方案1 ​​

autocmd BufReadPost * if line("'\"") >= 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif

解决方案2

if !exists(":DiffOrig")
  command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis | wincmd p | diffthis
endif

尴尬我早些没试过,谢谢。如果需要,可以在这里发布给其他人! :)