This package will run various script files inside of Atom. It currently supports JavaScript, CoffeeScript, Ruby, Python, Go, Bash and PowerShell scripts. You can add more!
- Hit Ctrl+R (Alt+R on Win/Linux) to launch the runner for the active window.
- Hit Ctrl+Shift+R (Alt+Shift+R on Win/Linux) to run the currently selected text in the active window.
- Hit Ctrl+Shift+C to kill a currently running process.
- Hit Escape to close the runner window.
- A docked runner window with ANSI support and ESC keybinding to close.
- PATH and environment variable detection on OSX.
- Shebang executable detection in all source files.
- Configurable commands based on file scope or filename matches.
- Execute unsaved file buffers!
This package uses the following default configuration:
'runner':
'scopes':
'coffee': 'coffee'
'js': 'node'
'ruby': 'ruby'
'python': 'python'
'go': 'go run'
'shell': 'bash'
'powershell': 'c:\\windows\\sysnative\\windowspowershell\\v1.0\\powershell.exe -noninteractive -noprofile -c -'
'extensions':
'spec.coffee': 'mocha'
'ps1': 'c:\\windows\\sysnative\\windowspowershell\\v1.0\\powershell.exe –file'
Note: If a shebang is detected, that line will supersede the default registered command.
You can add more commands for a given language scope, or add commands by extension instead (if multiple extensions use the same syntax). Extensions are searched before scopes (syntaxes).
To do so, add the configuration to ~/.atom/config.cson
in the format provided
above.
The mapping is SCOPE|EXT => EXECUTABLE
, so to run JavaScript files through
phantom, you would do:
'runner':
'scopes':
'js': 'phantom'
Note that the source.
prefix is ignored for syntax scope listings.
Similarly, in the extension map:
'runner':
'extensions':
'js': 'phantom'
Note that the .
extension prefix is ignored for extension listings.
This package is Copyright (c) Loren Segal 2014 and is licensed under the MIT license.