bryanweatherly / atom-script

Run (scripts | selections | source ) in Atom

Home Page:https://atom.io/packages/script

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Run code in Atom!

Run selections of code or the whole file!

Currently supports:

  • Bash
  • Coffeescript
  • CoffeeScript (Literate) ^
  • Erlang
  • Elixir
  • Go *
  • Groovy
  • F# *
  • Haskell *
  • Javascript
  • Julia
  • Lua
  • newLISP
  • Perl
  • PHP
  • Python
  • Ruby
  • Scala

You only have to add a few lines in a PR to support another.

Limitations

* Go and F# only support file based runs

Erlang uses erl for limited selection based runs (see #70)

^ Running selections of code for CoffeeScript (Literate) only works when selecting just the code blocks

Installation

apm install script

Usage

Make sure to run atom from the command line to get full access to your environment variables. Running Atom from the icon will launch using launchctl's environment.

Select some code and hit ⌘-i to run just that selection.

⌘-i to run your entire file.

⌘-shift-i to configure command options and program arguments

ctrl-c will kill the process but leaves the pane open.

ctrl-w closes the pane and kills the process.

To kill everything, click the close icon in the upper right and just go back to coding.

Development

Use the atom contributing guidelines. They're pretty sane.

Quick and dirty setup

apm develop script

This will clone the script repository to ~/github unless you set the ATOM_REPOS_HOME environment variable.

I already cloned it!

If you cloned it somewhere else, you'll want to use apm link --dev within the package directory, followed by apm install to get dependencies.

Workflow

After pulling upstream changes, make sure to run apm update.

To start hacking, make sure to run atom --dev from the package directory. Cut a branch while you're working then either submit a Pull Request when done or when you want some feedback!

About

Run (scripts | selections | source ) in Atom

https://atom.io/packages/script

License:MIT License


Languages

Language:CoffeeScript 72.2%Language:Perl 9.3%Language:CSS 5.2%Language:Python 4.9%Language:Julia 2.2%Language:Groovy 1.3%Language:JavaScript 0.9%Language:PHP 0.8%Language:Scala 0.7%Language:Lua 0.5%Language:Common Lisp 0.5%Language:Erlang 0.4%Language:Go 0.4%Language:Haskell 0.3%Language:Elixir 0.3%Language:Shell 0.2%