vim启动时vim错误在fish shell中运行时

sch*_*san 14 vim shell fish tmux

这是我的错误:

~> vim .tmux.conf 
Error detected while processing /Users/###/.spf13-vim-3/.vim/bundle/syntastic/plugin/syntastic.vim:
line   23:
E484: Can't open file /var/folders/c4/4nb5t7cs3wb17_g1w5030xc40000gn/T/vmIMCqB/0
Error detected while processing /Users/###/.spf13-vim-3/.vim/bundle/vim-preview/plugin/preview.vim:
line   94:
E484: Can't open file /var/folders/c4/4nb5t7cs3wb17_g1w5030xc40000gn/T/vmIMCqB/1
Press ENTER or type command to continue
Run Code Online (Sandbox Code Playgroud)

我已经检查了每个文件中的那些行,并且它们都调用了系统('uname'),我对此并不熟悉.我认为这个错误可能与TERM(在tmux外面是xterm-256color,在里面是screen-256color)有关,但是在.tmux.conf中更改它没有任何效果.

任何文件都会发生这种情况

我在Mac OS X 10.8.1,vim 7.3,tmux 1.6上使用鱼壳.

sch*_*san 31

问题是由使用fish shell作为默认shell(在我的设置中.tmux.conf)引起的.要解决此问题,请将其添加到.vimrc文件的顶部:

set shell=/bin/sh 
Run Code Online (Sandbox Code Playgroud)

这篇文章帮我解决了问题:
Debian Bug报告日志 - #609599 vim-runtime:处理ruby.vim时检测到错误.
还要感谢评论家@MichaelSchuller和@romainl.

  • 具体来说 - 我将set shell =/bin/sh添加到我的.vimrc的开头 (9认同)