打开多个拆分后 OSX 狮子中的 Vim 段错误



OSX Lion 中的内置 vim 版本被破坏并且有时会出现段错误,这似乎是一个已知问题。 对我来说,当我打开不同文件的垂直和水平拆分组合并尝试保存其中一个时,就会发生这种情况。

我在以下位置找到了说明

http://www.jprabawa.com/2011/11/segmentation-fault-running-vim-on-os-x.html

这提供了有关如何安装不同版本的 vim 以解决问题的说明,但是当我运行 configure 时,出现以下错误:

jeff~/Documents/vim73$ ./configure --enable-gui=no
configure: loading cache auto/config.cache
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/jeffreyhodes/Documents/vim73/src':
configure: error: C compiler cannot create executables
See `config.log' for more details.

我找不到config.log文件。

在此期间,我一直在使用MacVim,但是有两个单独的应用程序来编辑程序并运行它们是一种痛苦。 在这个问题上,有人有什么智慧可以分享吗?

编辑:从X代码4.3安装命令行工具后,./configure工作,但现在运行make给出以下错误:

In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:120,
                 from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
                 from os_macosx.m:19:
/System/Library/Frameworks/Foundation.framework/Headers/NSTask.h:75: error: syntax error before '^' token
In file included from /System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:9,
                 from /System/Library/Frameworks/AppKit.framework/Headers/NSView.h:8,
                 from /System/Library/Frameworks/AppKit.framework/Headers/NSText.h:8,
                 from /System/Library/Frameworks/AppKit.framework/Headers/NSCell.h:10,
                 from /System/Library/Frameworks/AppKit.framework/Headers/NSActionCell.h:8,
                 from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:15,
                 from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
                 from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:403: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:403: error: 'type name' declared as function returning a function
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:17,
                 from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
                 from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20: error: 'type name' declared as function returning a function
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20: error: 'type name' declared as function returning a function
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:54,
                 from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
                 from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSDraggingItem.h:52: error: syntax error before '^' token
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:73,
                 from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
                 from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSSpellChecker.h:168: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSSpellChecker.h:168: error: 'type name' declared as function returning a function
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:194,
                 from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
                 from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119: error: 'type name' declared as function returning a function
make[1]: *** [objects/os_macosx.o] Error 1
make: *** [first] Error 2

我通过使用命令行运行macvim暂时修补了这个问题mvim -v,但是有谁知道如何解决上述问题?

rm ~/.viminfo

崩溃会消失

最新更新