Git Product home page Git Product logo

atom-script's People

Contributors

a-manning avatar adampohl avatar aminya avatar andyrichardson avatar avonmoll avatar calyhre avatar chosko avatar danielbayley avatar entilzha avatar erip avatar erran avatar fscherwi avatar hansrodtang avatar idleberg avatar jparet avatar lbatson avatar lgeiger avatar liamdawson avatar mattddowney avatar nixel2007 avatar oderwat avatar pardom avatar rgbkrk avatar semantic-release-bot avatar singond avatar smashwilson avatar stormherz avatar teggy avatar thebrenny avatar xsstudio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atom-script's Issues

Ctrl-w doesn't close the console

Any thoughts on what's the root cause?
I need to manually close the window since CTRL-W is not closing the window.

I've run a ruby code on a Rails project.

Close button alignment

I see you put the close on the far right and it looks good and i know you want it that way but the problem still isn't solved. You've run into the same issue I had with it. It looks fine when the Tree View is showing (which is what is causing that 200 px or so offset) however it looks messed up at all sizes for the editor when not showing. Here's an example.

screen shot 2014-03-07 at 6 51 51 am

So unless you can toggle the padding off when Tree View is not displayed then I think it should go back to the left. It may be possible to toggle that css off by adding a class that adds the padding and removing/adding when Tree View is hidden/visible or something but for now it's still an issue.

Also if you can fix the close button to work on the right i I think the title padding or margin should move over more to the left. I looks a bit misaligned as well after moving the close button.

Minor Environment Path Issue running Javascript files

Not sure if this an issue with atom.io's default path variables.

I was on version 0.92.0, the script package was working and executing Javascript as normal. Then, I upgraded to Atom.io 0.93.0 and script could no longer find my node installation (under /usr/local/bin).

I created a quick symbolic link from /usr/local/bin/node => /usr/bin/node and it fixed the issue. Again perhaps, something changed with the default Atom.io installation where it doesn't include /usr/local/bin by default. But, wanted to call out the issue here since it impacted the script package.

No longer using my PATH

Since the latest update (Might be Atom update or atom-script, I updated both at the same time), atom-script no longer detects my PATH even though a Terminal plugin with "env" detects it just fine.

It still works through terminal, but the PATH through the Atom Terminal is the same as it was before, even without the terminal.

screenshot 2014-04-08 02 15 29

SQL Execution Support

Is anyone working on executing sql scripts? If this is not already in the works, I can do so.

Support "Line Number Based" runs

I'll convert this into a PR once #108 has been merged.

For now let's keep this as an issue to discuss how line based runs should be implemented.

I see two immediate possibilities:

  • Selection Based
    • Passes the current Selection object to buildArgs
    • Uses args: (filename, selection) -> ['-e', selection.getText()] as the buildArgs block
  • Line Number Based
    • Adds a new argType that passes the current Selection object to buildArgs
    • Possibly conflicts with "Selection Based"

Change Output View CSS px to %

Does it make sense to change the output view from px to %? I find when I am changing the height of Atom, particularly not as tall, the output view consumes quite a bit of space.

Perhaps it might make sense to investigate (and I can make a pull request for it if it look worth it) how to let the user drag the windows up and down to resize it.

New animation for README

I just realized the animation doesn't show the select-to-run functionality of atom-script and isn't spoken about until the usage section.

Put the close button on the far right.

The close button needs to go over to the left.

If we add a pull-right, the close button disappears due to the header view using position: fixed

pullright

If we make position absolute though, the header isn't flush.

screen shot 2014-03-06 at 3 52 57 pm

Handle terminal colors

Atom-script should show terminal colors appropriately.

screen shot 2014-03-10 at 4 37 33 pm

Sample python:

def print_format_table():
    """
    prints table of formatted text format options
    """
    for style in xrange(8):
        for fg in xrange(30,38):
            s1 = ''
            for bg in xrange(40,48):
                format = ';'.join([str(style), str(fg), str(bg)])
                s1 += '\x1b[%sm %s \x1b[0m' % (format, format)
            print s1
        print '\n'

print_format_table()

Expected Output:

Specify executable on run with cmd-shift-i

Like #5, allow the user to specify a specific executable and args on run.

From ##atom:

[16:42:42] <intothev01d>     rgbkrk: yea i was talking about passing args for the script itself (as in if the script accepts running with command line args)
[16:42:57] <intothev01d>     just a thought. pretty cool like it is
[16:43:01] <rgbkrk>  Hmmm
[16:43:14] <rgbkrk>  I guess I could make another entrypoint
[16:43:21] <rgbkrk>  where you specify the command you want run
[16:43:49] <rgbkrk>  Which also makes it easy in case it's not supported by the package
[16:43:52] <rgbkrk>  I like that idea
[16:43:59] <rgbkrk>  intothev01d - What keybinding?
[16:44:08] <intothev01d>     cmd-shift-i maybe?
[16:44:12] <rgbkrk>  Cool
[16:44:14] <intothev01d>     dunno if that already does something

Run file mode

Create a mode that runs the whole file, passing the filename to the relevant executable.

error styling

I have the styles branch that shows how I've updated the new window to remove border radius and use the built in error class for errors and stderr. let me know what you think or if it's better the way it was.

File or 'buffer' should be autosaved on script run (โŒ˜I)

Currently if you run a script without saving it before, it's like if you didn't do any modification.
This make it painful to iterate on short lived script (because you need to save, then run the file each time), so it's a two step process.
Make it one (like Texmate do for example).

If saving the file seems like a problem to you, maybe you could run a copy of the current buffer state instead, or something like that.
But I don't think saving is really a problem.

Running Node.js?

I'm getting the following error:

execvp(): No such file or directory

I also got the same error when using the atom-runner package. I thought maybe this script one might work different or something. Is it possible to run Node.js scripts and show the output?

I thought Atom was supposed to be able to do this, that's basically the entire point of Atom for me...Opposed to just running Node in my terminal.

Is there something else I need to setup?
Thanks.

Feature Request: HTML Output

Having previously used C# quite a bit, LINQPad was indispensible (http://www.linqpad.net/). Being able to "dump()" any object graph and see nested tables was great for testing APIs. I've seen some atom packages use HTML views so I know its possible.

Change Default CWD

I am working with a python script which uses a path relative to its own location in my folder to find another file. It seems that the cwd for script is the folder which atom has open rather than the directory of the script being run. Would it be possible to add that option?

EDIT: I am not familiar with the codebase, but wouldn't be opposed to learning about it and giving a shot at implementing with some direction on where to start

Feature request: add reprs

I think a great addition to this project would be the ability to include a repr (rather than just seeing the stdout), so that the code is run and then you have access to the variables/functions on either your selection or for entire file.

Plans to add color output?

Are there any plans to support color output? Specifically I was thinking either rspec or minitest support. Sorry if this is totally off-base, normally I would try to tackle it before asking someone else to look into it but I'm a pretty green developer and not great with java/coffee script.

Display status on run, stop, kill

It would be great if we show some sort of status, icon, etc. when something is currently running, when it stops, and if it is killed.

Get correct line number when doing selection based runs

In the example, you paste in an exception (to python) and it raises on line 2 (as this is the line in the pasted input, rather than line in the text file). One idea would be to prepend '\n' * (line_number - 1) to the selected text which would mean that it raises on the actual line number.

ENOENT when launching from a directory other than home

Fairly clean install of atom (nuked my .atom/ earlier)

going to ~/ and typing atom works as expected, I can even open files in other directories and life is good

navigating to any sub-directory of ~ and typing atom ...when I run Script, I get the ENOENT error

May be path related (I would guess), but I would assume this would work as-is out of the box.

HTML output renders/causes errors.

I was testing outputting HTML to the terminal for debugging reasons and and something similar to the image above turned up, not really ideal and could cause errors for other output that includes HTML-like syntax or symbols.

Can be fixed by adding:

line = line.replace /</g, '&lt;'.replace />/g, '&gt;'

before ansiFilter in display, but there are probably better ways to do it.

ctrl-c keybinding conflict in linux

Hey. Awesome work.
The issue is that ctrl-c keybinding conflicts with the classic [ctrl-c]= edit > copy
So once the package is installed, the copy shortcut doesn't work anymore. :)
Cheers!

(Personally I modify it to ctrl-q that makes sense and doesn't have any conflict)

Add changelog

This is something I should have started doing right away. I didn't realize how many contributors would come and how much would change along the way. Time to get in the habit as maintainers.

Feature Request: Separate run results per tab

Currently, when I cmd-I a script, the output appears in the lower view. The lower view is shared by all of the files I currently have open. Would it be possible to have separate output views for each script that I've run? In other words, the output view would be associated with the tab from which it was run. Switching to another open file would either show the output view for that file if there was one, or no output view if that file does not yet have code that's been run.

Error when language isn't selected

The grammar type when a language isn't selected is NullGrammar. Make sure to display a useful error message.

[17:02:48] <intothev01d>     rgbkrk, i just installed. i noticed that if it's a new file untitled and plain text or something it won't select the grammar and is undefined. maybe a dialog warning that they need to save as a file type first or something?
[17:03:13] <rgbkrk>  Yeah
[17:03:18] <rgbkrk>  I totally need to case that off
[17:03:39] <rgbkrk>  I'll make it use the dropdown above
[17:03:45] <rgbkrk>  Unless there's a better spot for feedback
[17:04:29] <intothev01d>     what about the popup you get when you click on they grammar type at the bottom, it just has a list to select from or autoselect

Node Debugger

Is their a way to use atom-script with JavaScript's debugger cmd.

I tried to use the following script for executing in my file debug

node debug $1

This would be so awesome.

Got error when I try to run js code

I just installed the script plugin today on the latest atom editor 0.69.

I have a file named test.js, I defined a test function like it

function test() {
    console.log('hello world');
}
test();

Then I hit cmd-i, I got an error

 execvp(): No such file or directory

Tried in the readme shell script ls example, it did not work for me at all. I am using the [email protected] , is there any special setup to use this plugin? thanks

It doesn't seem to work on Linux (Ubuntu 14.04)

I successfully installed the package but nothing happens. Trying to run some bash script.

I changed the keymap since I don't have the cmd key, but besides that, I didn't made any change.

Atom

Cant down load script, safari wont download atom script?

Go script runner outputting wrong order to STDOUT

Hello,

I hope this is the correct place for the bug:

I have the following sample script:

package main

import (
    "fmt"
    "log"
)

func main() {

    fmt.Println("A")
    log.Println("B")
    repeat()
    log.Println("D")
}

func repeat() {
    for x := 0; x < 5; x++ {
        fmt.Println("C")
    }
}

Expected output is (this matches invoking go run [file.name] as well from the terminal directly):

A
2014/03/31 11:35:57 B
C
C
C
C
C
2014/03/31 11:35:57 D

The output from Atom.io is:

A
C
C
C
C
C
2014/03/31 11:35:43 B
2014/03/31 11:35:43 D

The issue seams so far to be when log commands are mixed with fmt commands.

R Support

Has anyone looked into adding R Support? Not sure how feasible it would be. Here is what I came up with:

R:
"Selection Based":
command: "RScript"
args: (code) -> ['--vanilla -e', code]
"File Based":
command: "RScript"
args: (filename) -> [filename]

I guess the problem is when working with R, you generally want to be able to keep an open connection, and RScript will close it when the command or file is done executing. A better alternative would probably be do open an R session, and pipe commands in. Not sure how to go about doing that, or if it is possible under atom-script.

Pane pain

If you're using the right pane or open a new window from the script's output, it just opens in that right pane again.

panepain

copy output pane to clipboard

This may be an atom limitation, not sure, but it would be really nice to be able to copy all or part of the output pane to the clipboard to paste elsewhere.

Brad

Single window to run scripts

This would solve #26, #27, #28 since we can run each process in the single window. When a new one starts the old one is terminated and the new is replaced. Also it can attach some sort of indicator showing running, stopped, terminated etc as part of the display window. I agree and like the way the window could be placed below the active script. Eventually could even have a choice to run underneath or side by side either through config settings or flag/command passing on start.

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.