Atom-script: Option to set default profile or default settings per language

Created on 18 Feb 2016  路  6Comments  路  Source: atom-community/atom-script

For some reason script/Atom.io selects an old PHP 5.5 which is nowhere in my path. So I have to run using a profile which is super inconvenient (extra key comb + select profile + hit enter).

Alternatively add cmd path settings.

(Wondering how command is executed, what is the env/context? I'd say that /bin/env $cmd should give the "correct" version in most cases?)

Most helpful comment

This worked for me for python. In the _/home/.atom/packages/script/lib/grammars.coffee_ file, under Python, change the default python commands to python3. Although this describes a solution to setting python3 as default, all other language preferences can be edited in that file, too.

All 6 comments

This would be really useful. Babel now recommends not installing babel-cli globally. This makes running ES2015 code with atom-script require a profile to point it to your local copy of babel-node, and the extra keystrokes can get pretty annoying after a while. I'm guessing this is a pretty common use case.

@shanecav In my ideal situation it would run it relative to npm bin, so it picks up all the babel plugins you have installed locally as dev deps too. Not sure how to carry that out in the context of Atom script though.

+1

Has anyone tried a hack around this? I need to run STATA as a different profile every time to pick up the different flavour (MP vs default)

I tried overriding the grammar -> command mapping in my init script but that didn't work:

script:
  Python:
    "File Based":
      command = "python3"

This worked for me for python. In the _/home/.atom/packages/script/lib/grammars.coffee_ file, under Python, change the default python commands to python3. Although this describes a solution to setting python3 as default, all other language preferences can be edited in that file, too.

Was this page helpful?
0 / 5 - 0 ratings