Coder Social home page Coder Social logo

aoirint / atom-terminus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from duhdugg/atom-terminus

0.0 0.0 0.0 1.49 MB

Atom package to open terminal on current file's directory or project root. Fork of atom-terminal with various improvements.

Home Page: https://atom.io/packages/atom-terminus

License: Other

CoffeeScript 100.00%

atom-terminus's Introduction

atom-terminus

atom-terminus

How To

Open terminal on current file's directory with ctrl-shift-t.

Open a terminal in the current file's project root directory with alt-shift-t.

Keybindings: ctrl-shift-t, alt-shift-t

Install: apm install atom-terminus

Config:

"atom-terminus":
    # only necessary if standard config doesn't find terminal app
    app: "/path/to/your/favorite/terminal"
    args: "--use TheseOptions --when LaunchingTerminal"
    commandPrefix: "EnvironmentVariable=\"Value\""

What's New?

The following are improvements that you will find in this package which are not in atom-terminal:

  • Support for multiple project roots
  • Ability to set a prefix for the command (useful for setting environment variables in Linux or Mac)
  • Wild card capabilities
  • Better Linux support

What's Gone?

With the above improvements, the following options from atom-terminal have been removed.

  • Suppress Directory Argument
    • The "%d" wild card is used when you want to include the directory in the arguments.
      • Linux example (gnome-terminal and others): --working-directory "%d"
    • If you don't want the directory argument, simply don't include it in your args config. If you notice that clearing your args config still leaves you with a default value, you can set a truly empty value by entering a single space character in the args config.

Wild Cards

The following can be used anywhere in the Args or Command Prefix:

  • %d - The absolute path of the current file's directory or project root (whichever is executed)
  • %p - The absolute path of the current file
  • %f - The relative path of the current file (relative to %d)

Examples

(Linux) Set environment variables for current file, use directory argument, and execute an alternate shell

"atom-terminus":
    app: "/usr/bin/gnome-terminal"
    args: "--working-directory \"%d\" -x zsh"
    commandPrefix: "p=\"%p\" f=\"%f\""

Clearing node variables

Atom spawns new processes with the environment variables NODE_ENV=production and NODE_PATH to Atom's internal library path. If you plan on executing npm install or yarn install, you should clear these variables.

On most non-Windows machines this will be as simple as:

"atom-terminus":
    commandPrefix: "NODE_ENV='' NODE_PATH=''"

(Windows) Clear environment variables and use directory argument

"atom-terminus":
    app: "C:\\Windows\\System32\\cmd.exe"
    args: "/K \"set NODE_PATH=& set NODE_ENV=& cd \"%d\"\""
    commandPrefix: ""

atom-terminus's People

Contributors

axsann avatar duhdugg avatar dz0ny avatar forivall avatar hesstobi avatar joshcheek avatar mottie avatar pwielgolaski avatar tkw1536 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.