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

时间:2012-09-01 18:27:49

标签: shell vim tmux fish

这是我的错误:

~> 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

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

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

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

1 个答案:

答案 0 :(得分:30)

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

set shell=/bin/sh 

这篇文章帮助我解决了问题:
Debian Bug report logs - #609599 vim-runtime: Error detected while processing ruby.vim
还要感谢评论家@MichaelSchuller和@romainl。