Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim errors on vim startup when run in fish shell

Tags:

shell

vim

tmux

fish

Here's my error:

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

I've checked those lines in each file and they both call system('uname'), which I'm unfamiliar with. I thought this error might have something to do with TERM (which is xterm-256color outside tmux and screen-256color inside), but changing this in the .tmux.conf has no effect.

This happens with any file.

I'm on Mac OS X 10.8.1, vim 7.3, tmux 1.6 and am using the fish shell.

like image 726
schellsan Avatar asked Sep 01 '12 18:09

schellsan


1 Answers

The problem is caused by the use of the fish shell as the default shell (set in my .tmux.conf). To solve the problem, add this to the top of your .vimrc file:

set shell=/bin/sh 

This post helped me sort things out:
Debian Bug report logs - #609599 vim-runtime: Error detected while processing ruby.vim.
Also thanks to commenters @MichaelSchuller and @romainl.

like image 186
schellsan Avatar answered Oct 25 '22 11:10

schellsan