Permalink
Browse files

Set a sensible g:sclandTerm when on Linux

This should allow Linux users to use their default terminal emulator,
rather than having to explicitly set one. Or at least it will on Debian
and Ubuntu based systems. I'm not sure what other systems use the
x-terminal-emulator alias.

I've also removed some trailing whitespace.
  • Loading branch information...
lpil committed Sep 18, 2014
1 parent bfd5da5 commit 9bb1bb89b2f45d79a1c2278b09fc47e5443097ad
Showing with 14 additions and 11 deletions.
  1. +11 −10 README.md
  2. +3 −1 ftplugin/supercollider.vim
View
@@ -1,12 +1,12 @@
SCVim (> 3.5)
==============
-A vim plugin for supercollider.
+A vim plugin for supercollider.
This is based of the original scvim by Alex Norman (see:
-<http://www.x37v.info/scvim/>).
+<http://www.x37v.info/scvim/>).
-Features
+Features
* Syntax Highlighting
* A faked REPL via the terminal
@@ -26,10 +26,10 @@ Installation:
It is highly recommended to use pathogen
(<https://github.com/tpope/vim-pathogen>) to keep your .vim paths clean. See the
-supplied helpfile how to setup pathogen if you haven't used it before.
+supplied helpfile how to setup pathogen if you haven't used it before.
Make sure the folder is named 'scvim' and drop it into your "bundle" folder, e.g.
-"~/.vim/bundle/scvim".
+"~/.vim/bundle/scvim".
Or just do:
`
@@ -73,15 +73,16 @@ Path to the tags file
The following variables are available for configuration in your `.vimrc` file:
* `g:sclangTerm`: Command to open a terminal window. Defaults to `"open -a
-Terminal.app"`.
+Terminal.app"` on OSX, and `"x-terminal-emulator -e $SHELL -ic"` on Linux. On
+some Linux systems this value may need to changed.
* `g:sclangPipeApp`: Absolute path to the plugin **start_pipe** script. Defaults
to `"~/.vim/bundle/scvim/bin/start_pipe"`. Change it if you have installed
the plugin in other location.
* `g:sclangDispatcher`: Absolute path to the plugin **sc_dispatcher** script.
Defaults to `"~/.vim/bundle/scvim/bin/sc_dispatcher"`. Change it if you
have installed the plugin in other location.
-Example `.vimrc` line for debian/ubuntu users:
+Example `.vimrc` line for gnome-terminal users:
let g:sclangTerm = "gnome-terminal -x $SHELL -ic"
@@ -94,15 +95,15 @@ If for some reason vim can't find the path to the two launch scripts
Using it:
--------
To start open a file with the right extension :e foo.sc(d)
-Enter `:SClangStart` and a terminal should open with a running sclang session.
+Enter `:SClangStart` and a terminal should open with a running sclang session.
-See the commands reference for general usage.
+See the commands reference for general usage.
_ctags support_:
run `:SCTags` from vim or `SCVim.generateTagsFile()` from sclang
-This gives you a couple of things:
+This gives you a couple of things:
* You can jump to any known class or method
* You get tags completion with ctrl-x ctrl-] (use the vim supertab plugin if this is too
@@ -43,6 +43,8 @@ endif
if exists("g:sclangTerm")
let s:sclangTerm = g:sclangTerm
+elseif system('uname') =~ 'Linux'
+ let s:sclangTerm = "x-terminal-emulator -e $SHELL -ic"
else
let s:sclangTerm = "open -a Terminal.app"
endif
@@ -196,7 +198,7 @@ endfunction
" ========================================================================================
function SClangStart()
- call system(s:sclangTerm . " " . s:sclangPipeApp)
+ call system(s:sclangTerm . " " . s:sclangPipeApp . "&")
endfunction
function SClangKill()

0 comments on commit 9bb1bb8

Please sign in to comment.