From 955ab2dcc762f8545fb364b5c8a494734afaa6cb Mon Sep 17 00:00:00 2001 From: Carlo Capocasa Date: Sun, 23 Nov 2014 21:40:02 +0100 Subject: [PATCH] check for pipe in vim --- ftplugin/supercollider.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ftplugin/supercollider.vim b/ftplugin/supercollider.vim index 6bd68f1..c69f8c3 100644 --- a/ftplugin/supercollider.vim +++ b/ftplugin/supercollider.vim @@ -200,6 +200,9 @@ endfunction let s:sclangStarted = 0 function SClangStart() + if filereadable("/tmp/sclang-pipe") + echo "sclang is already running" + else if $TERM[0:5] == "screen" if executable("tmux") call system("tmux split-window -p 20 ; tmux send-keys " . s:sclangPipeApp . " Enter ; tmux select-pane -U") @@ -211,6 +214,7 @@ function SClangStart() call system(s:sclangTerm . " " . s:sclangPipeApp . "&") let s:sclangStarted = 1 endif + endif endfunction function SClangKill()