Git Product home page Git Product logo

atom-script's Introduction

Run code in Atom!

Run selections of code or the whole file!

Currently supported grammars are:

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

NOTE: Some grammars may require you to install a custom language package.

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

Limitations

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

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

* Cucumber (Gherkin), Go, F#, and RSpec only support file based runs

Installation

apm install script

or

Atom can't find node | ruby | python | my socks

Make sure to launch Atom from the console/terminal. This gives atom all your useful environment variables.

If you really wish to open atom from a launcher/icon, see this issue for a variety of workarounds that have been suggested.

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!

atom-script's People

Contributors

bryanweatherly avatar ciarand avatar cormullion avatar entilzha avatar erran avatar hansrodtang avatar hayd avatar intothev01d avatar ivanoats avatar jbtule avatar johanb avatar lbatson avatar rgbkrk avatar smashwilson avatar tehnix avatar yhpark avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.