ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Terminal

by Will Bond (wbond) ALL Top 100

Launch terminals from the current file or the root project folder

Labels terminal

Details

Installs

  • Total 933K
  • Win 509K
  • Mac 222K
  • Linux 203K
Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26
Windows 1 45 46 53 39 39 27 28 47 46 47 61 45 29 20 43 53 47 49 43 31 42 47 46 55 58 51 27 34 31 62 61 48 50 32 28 40 53 55 45 35 36 41 56 57 46
Mac 0 18 16 16 14 12 15 11 17 14 13 23 12 11 17 15 25 19 9 16 13 11 8 23 18 26 13 16 7 11 16 21 17 15 11 18 17 15 15 17 15 9 11 15 15 19
Linux 0 24 10 10 19 13 15 13 16 22 20 20 12 19 10 22 17 30 26 18 25 11 20 19 18 25 26 19 18 19 15 15 14 17 8 15 14 22 15 15 23 9 18 19 24 16
020406080100Apr 12Apr 9Apr 6Apr 3Mar 31Mar 28Mar 25Mar 22Mar 19Mar 16Mar 13Mar 10Mar 7Mar 4Mar 1Feb 26Apr 12 Linux: 0 Mac: 0 Windows: 1Apr 11 Linux: 24 Mac: 18 Windows: 45Apr 10 Linux: 10 Mac: 16 Windows: 46Apr 9 Linux: 10 Mac: 16 Windows: 53Apr 8 Linux: 19 Mac: 14 Windows: 39Apr 7 Linux: 13 Mac: 12 Windows: 39Apr 6 Linux: 15 Mac: 15 Windows: 27Apr 5 Linux: 13 Mac: 11 Windows: 28Apr 4 Linux: 16 Mac: 17 Windows: 47Apr 3 Linux: 22 Mac: 14 Windows: 46Apr 2 Linux: 20 Mac: 13 Windows: 47Apr 1 Linux: 20 Mac: 23 Windows: 61Mar 31 Linux: 12 Mac: 12 Windows: 45Mar 30 Linux: 19 Mac: 11 Windows: 29Mar 29 Linux: 10 Mac: 17 Windows: 20Mar 28 Linux: 22 Mac: 15 Windows: 43Mar 27 Linux: 17 Mac: 25 Windows: 53Mar 26 Linux: 30 Mac: 19 Windows: 47Mar 25 Linux: 26 Mac: 9 Windows: 49Mar 24 Linux: 18 Mac: 16 Windows: 43Mar 23 Linux: 25 Mac: 13 Windows: 31Mar 22 Linux: 11 Mac: 11 Windows: 42Mar 21 Linux: 20 Mac: 8 Windows: 47Mar 20 Linux: 19 Mac: 23 Windows: 46Mar 19 Linux: 18 Mac: 18 Windows: 55Mar 18 Linux: 25 Mac: 26 Windows: 58Mar 17 Linux: 26 Mac: 13 Windows: 51Mar 16 Linux: 19 Mac: 16 Windows: 27Mar 15 Linux: 18 Mac: 7 Windows: 34Mar 14 Linux: 19 Mac: 11 Windows: 31Mar 13 Linux: 15 Mac: 16 Windows: 62Mar 12 Linux: 15 Mac: 21 Windows: 61Mar 11 Linux: 14 Mac: 17 Windows: 48Mar 10 Linux: 17 Mac: 15 Windows: 50Mar 9 Linux: 8 Mac: 11 Windows: 32Mar 8 Linux: 15 Mac: 18 Windows: 28Mar 7 Linux: 14 Mac: 17 Windows: 40Mar 6 Linux: 22 Mac: 15 Windows: 53Mar 5 Linux: 15 Mac: 15 Windows: 55Mar 4 Linux: 15 Mac: 17 Windows: 45Mar 3 Linux: 23 Mac: 15 Windows: 35Mar 2 Linux: 9 Mac: 9 Windows: 36Mar 1 Linux: 18 Mac: 11 Windows: 41Feb 28 Linux: 19 Mac: 15 Windows: 56Feb 27 Linux: 24 Mac: 15 Windows: 57Feb 26 Linux: 16 Mac: 19 Windows: 46Apr 12 Linux: 0 Mac: 0 Windows: 1Apr 11 Linux: 24 Mac: 18 Windows: 45Apr 10 Linux: 10 Mac: 16 Windows: 46Apr 9 Linux: 10 Mac: 16 Windows: 53Apr 8 Linux: 19 Mac: 14 Windows: 39Apr 7 Linux: 13 Mac: 12 Windows: 39Apr 6 Linux: 15 Mac: 15 Windows: 27Apr 5 Linux: 13 Mac: 11 Windows: 28Apr 4 Linux: 16 Mac: 17 Windows: 47Apr 3 Linux: 22 Mac: 14 Windows: 46Apr 2 Linux: 20 Mac: 13 Windows: 47Apr 1 Linux: 20 Mac: 23 Windows: 61Mar 31 Linux: 12 Mac: 12 Windows: 45Mar 30 Linux: 19 Mac: 11 Windows: 29Mar 29 Linux: 10 Mac: 17 Windows: 20Mar 28 Linux: 22 Mac: 15 Windows: 43Mar 27 Linux: 17 Mac: 25 Windows: 53Mar 26 Linux: 30 Mac: 19 Windows: 47Mar 25 Linux: 26 Mac: 9 Windows: 49Mar 24 Linux: 18 Mac: 16 Windows: 43Mar 23 Linux: 25 Mac: 13 Windows: 31Mar 22 Linux: 11 Mac: 11 Windows: 42Mar 21 Linux: 20 Mac: 8 Windows: 47Mar 20 Linux: 19 Mac: 23 Windows: 46Mar 19 Linux: 18 Mac: 18 Windows: 55Mar 18 Linux: 25 Mac: 26 Windows: 58Mar 17 Linux: 26 Mac: 13 Windows: 51Mar 16 Linux: 19 Mac: 16 Windows: 27Mar 15 Linux: 18 Mac: 7 Windows: 34Mar 14 Linux: 19 Mac: 11 Windows: 31Mar 13 Linux: 15 Mac: 16 Windows: 62Mar 12 Linux: 15 Mac: 21 Windows: 61Mar 11 Linux: 14 Mac: 17 Windows: 48Mar 10 Linux: 17 Mac: 15 Windows: 50Mar 9 Linux: 8 Mac: 11 Windows: 32Mar 8 Linux: 15 Mac: 18 Windows: 28Mar 7 Linux: 14 Mac: 17 Windows: 40Mar 6 Linux: 22 Mac: 15 Windows: 53Mar 5 Linux: 15 Mac: 15 Windows: 55Mar 4 Linux: 15 Mac: 17 Windows: 45Mar 3 Linux: 23 Mac: 15 Windows: 35Mar 2 Linux: 9 Mac: 9 Windows: 36Mar 1 Linux: 18 Mac: 11 Windows: 41Feb 28 Linux: 19 Mac: 15 Windows: 56Feb 27 Linux: 24 Mac: 15 Windows: 57Feb 26 Linux: 16 Mac: 19 Windows: 46Apr 12 Linux: 0 Mac: 0 Windows: 1Apr 11 Linux: 24 Mac: 18 Windows: 45Apr 10 Linux: 10 Mac: 16 Windows: 46Apr 9 Linux: 10 Mac: 16 Windows: 53Apr 8 Linux: 19 Mac: 14 Windows: 39Apr 7 Linux: 13 Mac: 12 Windows: 39Apr 6 Linux: 15 Mac: 15 Windows: 27Apr 5 Linux: 13 Mac: 11 Windows: 28Apr 4 Linux: 16 Mac: 17 Windows: 47Apr 3 Linux: 22 Mac: 14 Windows: 46Apr 2 Linux: 20 Mac: 13 Windows: 47Apr 1 Linux: 20 Mac: 23 Windows: 61Mar 31 Linux: 12 Mac: 12 Windows: 45Mar 30 Linux: 19 Mac: 11 Windows: 29Mar 29 Linux: 10 Mac: 17 Windows: 20Mar 28 Linux: 22 Mac: 15 Windows: 43Mar 27 Linux: 17 Mac: 25 Windows: 53Mar 26 Linux: 30 Mac: 19 Windows: 47Mar 25 Linux: 26 Mac: 9 Windows: 49Mar 24 Linux: 18 Mac: 16 Windows: 43Mar 23 Linux: 25 Mac: 13 Windows: 31Mar 22 Linux: 11 Mac: 11 Windows: 42Mar 21 Linux: 20 Mac: 8 Windows: 47Mar 20 Linux: 19 Mac: 23 Windows: 46Mar 19 Linux: 18 Mac: 18 Windows: 55Mar 18 Linux: 25 Mac: 26 Windows: 58Mar 17 Linux: 26 Mac: 13 Windows: 51Mar 16 Linux: 19 Mac: 16 Windows: 27Mar 15 Linux: 18 Mac: 7 Windows: 34Mar 14 Linux: 19 Mac: 11 Windows: 31Mar 13 Linux: 15 Mac: 16 Windows: 62Mar 12 Linux: 15 Mac: 21 Windows: 61Mar 11 Linux: 14 Mac: 17 Windows: 48Mar 10 Linux: 17 Mac: 15 Windows: 50Mar 9 Linux: 8 Mac: 11 Windows: 32Mar 8 Linux: 15 Mac: 18 Windows: 28Mar 7 Linux: 14 Mac: 17 Windows: 40Mar 6 Linux: 22 Mac: 15 Windows: 53Mar 5 Linux: 15 Mac: 15 Windows: 55Mar 4 Linux: 15 Mac: 17 Windows: 45Mar 3 Linux: 23 Mac: 15 Windows: 35Mar 2 Linux: 9 Mac: 9 Windows: 36Mar 1 Linux: 18 Mac: 11 Windows: 41Feb 28 Linux: 19 Mac: 15 Windows: 56Feb 27 Linux: 24 Mac: 15 Windows: 57Feb 26 Linux: 16 Mac: 19 Windows: 46

Readme

Source
raw.​githubusercontent.​com

Sublime Terminal

Shortcuts and menu entries for opening a terminal at the current file, or any directory in Sublime Text.

Installation

Download Package Control and use the Package Control: Install Package command from the command palette. Using Package Control ensures Terminal will stay up to date automatically.

Usage

  • Open Terminal at File Opens a terminal in the folder containing the currently opened file.
  • Open Terminal at Project Folder Opens a terminal in the project folder containing the currently opened file.

Terminals can be opened via the command palette, the editor context menu and the sidebar context menus. Additionally, you can set up key bindings.

Key bindings

To create keyboard shortcuts, open the Preferences > Package Settings > Terminal > Key Bindings menu entry. Our suggested key bindings are on the left, you can copy these over to your personal bindings on the right and tweak them to your liking. Example:

[
  { "keys": ["super+shift+t"], "command": "open_terminal" },
  { "keys": ["super+shift+alt+t"], "command": "open_terminal_project_folder" }
]

Note that in version 2 of this package, we stopped enabling these bindings by default. They conflicted with built-in bindings of Sublime Text, and users might have different preferences.

Package Settings

The settings can be viewed and edited by accessing the Preferences > Package Settings > Terminal > Settings menu entry.

  • terminal
    • The terminal to execute, will default to the OS default if blank.
    • Default: ""
  • parameters
    • The parameters to pass to the terminal. These parameters will be used if no custom parameters are passed.
    • Default: []
  • env
    • The environment variables changeset. Default environment variables used when invoking the terminal are inherited from Sublime Text.
    • The changeset may be used to overwrite/unset environment variables. Use null to indicate that the environment variable should be unset.
    • Default: {}

Custom Parameters

By passing parameters argument to the open_terminal or open_terminal_project_folder commands, it is possible to construct custom terminal environments. You can do so by creating custom key bindings that call these commands with the arguments you want, as we'll document here, or by adding custom command palette or menu entries.

The following is an example, of passing the parameters -T 'Custom Window Title' to an XFCE terminal.

{
 "keys": ["ctrl+alt+t"],
 "command": "open_terminal",
 "args": {
   "parameters": ["-T", "Custom Window Title"]
 }
}

A parameter may also contain the %CWD% placeholder, which will be substituted with the current working directory the terminal was opened to.

{
 "keys": ["ctrl+alt+t"],
 "command": "open_terminal",
 "args": {
   "parameters": ["-T", "Working in directory %CWD%"]
 }
}

Example configurations

Here are some example configurations calling different terminals. Note that paths to executables might differ on your machine.

Cmder on Windows

{
  "terminal": "C:\\Program Files\\cmder_mini\\cmder.exe",
  "parameters": ["/START", "%CWD%"]
}

xterm on GNU/Linux

{
  "terminal": "xterm"
}

gnome-terminal for CJK users on GNU/Linux

We unset LD_PRELOAD, as it may cause problems for Sublime Text with imfix.

{
  "terminal": "gnome-terminal",
  "env": {"LD_PRELOAD": null}
}

iTerm on MacOS.

{
  "terminal": "iTerm.sh"
}

iTerm on MacOS. with tabs

{
  "terminal": "iTerm.sh",
  "parameters": ["--open-in-tab"]
}

iTerm2 v3 on MacOS.

{
  "terminal": "iTerm2-v3.sh"
}

Hyper on MacOS.

{
  "terminal": "hyper.sh"
}

Kitty on OS X

{
  "terminal": "/opt/homebrew/bin/kitty",
  "parameters": ["-d", "%CWD%"]
}

Windows Terminal

{
  "terminal": "C:/Users/yourusername/AppData/Local/Microsoft/WindowsApps/wt.exe",
  "parameters": ["-d", "."]
}