Skip to main content

Terminals in Sublime Text 3

TL;DR - Need a quick answer on how to create terminals in Sublime Text 3? Scroll down and watch the video or read the instructions below it.

A while ago I started a series on YouTube of 'Sublime Text Tips'.

Sublime Text 3 is one the best code editors currently in existence (fact), but most people just install it an use it without realising how it can be customized and extended to meet your needs.

My aim was to release a series of videos explaining some of these widely unknown capabilities. I got as far as the third video and then got distracted with other things 😅

But recently I noticed the 3rd video I made has been increasing in popularity. For at least 6 months it sat at less than 200 views, and over the course of the last 2 months it has shot up to 850 (at the time of writing). Perhaps it's coincidence, or perhaps YouTube's algorithms have changed. Either way, there seem to be people who want this information.

The video explains how to set up terminals in Sublime Text 3 using a package called 'Terminus'. And here it is:

How to set up Terminals in Sublime Text 3

Open Sublime Text.
Open the Command Palette with Crtl+Shift+P

Type  'Package Control: Install Package' until the option appears and select it
[You'll need to install package control if you are using it for the first time]

Type 'Terminus' and select it.

Now the package Terminus will install. Wait for this to complete.
Then restart Sublime Text.

Next we will add Commands to the Command Palette. So you can open terminals using Crtl+Shift+P then typing a command.

To do this open the Command Palette (Ctrl+Shift+P) and type 'Terminus: Command Palette' and open it.

You'll be greeted by a split view. Basically there are settings defined in the code on the left panel and you can override them or add your own by typing code in the right panel.

Copy code from here into the right hand panel. Save the file with Ctrl+S.

This code adds commands so you can open terminals: Windows Command Prompt and Git Bash; from the Command Palette.

You'll need to edit this if you want to add your own terminals.

You can close the 'Terminus: Command Palette' window now.

To open Windows Command Prompt for example, open the Command Palette (Ctrl+Shift+P) and type 'Command Prompt (new Window)' to open it in a new tab or 'Command Prompt (panel)' to open it in a panel at the bottom of the screen.

Now we have terminals working, but we are not done.

Key Bindings

I'm a big fan of keyboard shortcuts. You can add keyboard shortcuts to open your favourite terminals for you in the following way.

Open Command Palette (Ctrl+Shift+P) and type 'Terminus: Key Bindings'
Again you'll get another split screen window and you'll need to put code in the right hand pane.

Copy and paste the code from here into the right hand pane. Save the file with Ctrl+S.

If you look through the code you'll see it adds the following shortcuts which can easily be changed:
Alt+1 - Opens Command Prompt
Alt+2 - Opens Git Bash
Alt+C - Opens Command Prompt
Alt+B - Opens Git Bash


Feel free to leave comments below. You can also contact me by email here.


Popular posts from this blog

Best Packages for Sublime Text 3 (Excluding Themes)

Sublime Text 3 is pretty good out-of-the-box but reaches a whole new level when you install some of the great packages on offer.

Below I'll list my favourite packages for Sublime Text. These are all packages which will enhance your productivity across all languages, so no themes or language-specific packages will be listed here.

Local Storage Models in Blazor

Blazor is a new web framework by Microsoft which ships with .NET Core. In this post I explain how to use Local Storage in Blazor using the Blazored.LocalStorage package and how to improve on this by creating a custom service allowing you to use models (classes with properties) instead of string keys.

Blazored.LocalStorage First I explain how to use local storage in Blazor. I assume you already have a blazor project setup.

Install the Blazored.LocalStorage package with using NuGet. This can be done using the command in the Visual Studio package manager: Install-Package Blazored.LocalStorage
Then in the 'Startup.cs' file add the following line to 'ConfigureServices' to make the LocalStorage service available through dependency injection: services.AddBlazoredLocalStorage();
Now you are ready to use local storage on your pages. To import the namespace on all pages you can add the following line to '_Imports.razor': @using Blazored.LocalStorage
Now within…

Generating a MSI Installer for a WPF Application

This post serves as a tutorial for creating a MSI installer for your WPF Applications in Visual Studio. For this we use WiX (recommended by Microsoft).

Prerequisites I assume you already have a Visual Studio solution containing a WPF Project. And I assume you have some experience with Visual Studio and XML. You do not need any prior knowledge of WiX.
Step 1: Install Wix We are going to need WiX to generate our MSI.

If you don't already have Wix installed, go ahead and download it from here. You'll be redirected to the relevant GitHub releases page where you can download the .exe file to install WiX.