Giter Site home page Giter Site logo

rellikjaeger / terminals-in-sublime-text Goto Github PK

View Code? Open in Web Editor NEW

This project forked from james231/terminals-in-sublime-text

1.0 1.0 1.0 9 KB

Use (Windows) Terminals within Sublime Text 3 such as: Command Prompt, Git Bash, Google Cloud SDK Shell, etc

terminals-in-sublime-text's Introduction

Terminals in Sublime Text

This repo contains some JSON code to help you add terminals to Sublime Text 3.

Requirements

Windows operating system.
Sublime Text 3 available here: https://www.sublimetext.com/3

Getting Started

Step 1: Install Terminus

Terminus is a great package for Sublime made randy3k. More information here: https://github.com/randy3k/Terminus

First you need to install terminus.
Press Ctrl+Shift+P in Sublime Text to open the Command Palette. Type in Terminus and select it. If you haven't installed Package Control already, you'll be prompted to do that now.

Once you have installed Terminus go back to the Command Palette (Ctrl+Shift+P) and type in Terminus: Open Default Shell in View. This should open a Command Prompt in a new window.
If you try the command Terminus: Open Default Shell in Panel it will open Command Prompt at the bottom of your screen.

This is great but we want some other kinds of shells with keyboard shortcuts to them.

Step 2: Other Shells

In the Command Palette (Ctrl+Shift+P) type in Terminus Command Palette. This should open up a split screen view. In this repository you'll find a Terminus Command Palette.json file. Copy and paste the contents into the right hand side of the split screen view and save it.
Read the comments in the code to see what it does. Make sure the code is using the correct path to your installation of Git Bash (or other shell). This occurs on lines 49 and 61. The default is:

"cmd": ["C:\\Program Files\\Git\\bin\\bash.exe", "-i", "-l"],

Note that double slashes are required (in order to escape single slashes).

The code should add new Commands to the Command Palette. Open the Command Palette (Ctrl+Shift+P) and make sure the commands work.
i.e. The command Git Bash (panel) should open Git Bash in the panel at the bottom of your screen.

You can add your own shells by copy and pasting your code. If your shells are based on Command Prompt then the lines containing the paths only need to be:

"cmd": "PATH_TO_YOUR_SHELL",

But, if your shells are not Command Prompt based (open externally from Command Prompt) then you need to use the following line:

"cmd": ["PATH_TO_YOUR_SHELL", "-i", "-l"],

Step 2: Keyboard Shorcuts

Open the Command Palette (Ctrl+Shift+P) and type Terminus Key Bindings. Then copy the contents of the Terminus Key Bindings.json file into the right hand side of the view and save it. This should add keyboard shortcuts to your shells. Again if you are using Git Bash, the path to it may need correcting.

The following shorcuts should work:

  • Ctrl+` - Toggles the Panel at the bottom of the screen open and closed
  • Ctrl+1 - Opens Command Prompt in the Panel
  • Ctrl+2 - Opens Git Bash in the Panel
  • Ctrl+c - Opens Command Prompt in the Panel
  • Ctrl+b - Opens Git Bash in the Panel

The code is well commented so it should be clear how it works. Again you can copy and paste the code to add your own shortcuts.

Acknowledgements

Thanks again to randy3k for developing Terminus. More information here: https://github.com/randy3k/Terminus

terminals-in-sublime-text's People

Contributors

james231 avatar keyansheng avatar xmichael446 avatar

Stargazers

Rellik Jaeger avatar

Watchers

James Cloos avatar

Forkers

obrian96

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.