Skip to content

Commit

Permalink
added config file
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffroymontel committed Feb 28, 2012
1 parent a6208ce commit 4d91024
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 14 deletions.
32 changes: 20 additions & 12 deletions Readme.md
@@ -1,23 +1,31 @@
# Supercollider package for Sublime Text 2

Tested on Windows XP only at the moment.
Feel free to test it on other environments, fork and pull.
Tested on Windows XP only at the moment.
Feel free to test it on other environments, fork and pull.

The syntax highlighting comes from RFWatson's SuperCollider TM Bundle
The syntax highlighting comes from RFWatson's SuperCollider TM Bundle
https://github.com/rfwatson/supercollider-tmbundle

Sublime Text 2 home page
Sublime Text 2 home page
http://www.sublimetext.com/2

Supercollider home page
Supercollider home page
http://supercollider.sourceforge.net

## Usage
Open Sublime Text 2
Go to Preferences/Browse Packages
Create a Supercollider directory.
Copy and paste all the files from this repository in it.
Restart Sublime Text 2
In Tools, there is a new Supercollider sub menu which allows you to start and stop sclang, evaluate a line (ctrl+enter), stop all sounds (ctrl+.), and show/hide the console.
If your line starts with the character '(', it should evaluate the whole expression. But it does not work right now. Sorry.
- Open Sublime Text 2
- Go to Preferences/Browse Packages
- Create a SuperCollider directory.
- Copy and paste all the files from this repository in it.
- Change Supercollider path in SuperCollider.sublime-settings
- Restart Sublime Text 2
- In Tools, there is a new Supercollider sub menu which allows you to :
- start and stop sclang,
- evaluate a line (ctrl+enter),
- stop all sounds (ctrl+.),
- and show/hide the console.
- If your line starts with the character '(', it should evaluate the whole expression. But it does not work right now. Sorry.

## Known bugs
- muliple lines evaluation does not work

5 changes: 3 additions & 2 deletions SuperCollider.py
Expand Up @@ -32,8 +32,9 @@ def run(self):

# start supercollider
if Sc_startCommand.sclang_thread is None or not Sc_startCommand.sclang_thread.isAlive():
sc_dir = 'C:\\Program Files\\SuperCollider-3.5-rc2\\'
sc_exe = 'sclang'
settings = sublime.load_settings("SuperCollider.sublime-settings")
sc_dir = settings.get("sc_dir")
sc_exe = settings.get("sc_exe")
print "Starting SuperCollider : "+sc_dir+sc_exe
Sc_startCommand.sclang_process = subprocess.Popen(sc_exe, cwd=sc_dir, bufsize=1, close_fds=ON_POSIX, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.STDOUT, universal_newlines=True, shell=True)
Sc_startCommand.sclang_queue = Queue()
Expand Down
7 changes: 7 additions & 0 deletions SuperCollider.sublime-settings
@@ -0,0 +1,7 @@
{
// SuperCollider directory (use double \\ in Windows)
"sc_dir": "C:\\Program Files\\SuperCollider-3.5-rc2\\",

// SCLang command name
"sc_exe": "sclang"
}

0 comments on commit 4d91024

Please sign in to comment.