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

Terminal

by Will Bond (wbond) ST2/ST3 Top 100

Launch terminals from the current file or the root project folder

Labels terminal

Details

Installs

  • Total 252K
  • Win 111K
  • OS X 79K
  • Linux 62K
Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11
Windows 118 251 217 210 129 127 180 214 220 232 197 132 147 212 184 248 240 250 110 136 194 216 235 251 220 122 159 196 204 212 223 230 104 159 208 221 257 242 237 150 158 256 231 227 270 246
OS X 64 137 119 134 75 65 111 124 132 114 105 57 68 112 120 124 134 102 50 57 114 146 119 135 122 69 71 98 124 118 140 124 61 62 96 112 114 107 107 67 64 101 111 108 118 113
Linux 40 107 105 93 58 74 81 84 118 97 74 68 57 77 82 82 99 79 58 76 72 90 80 97 100 51 67 85 66 77 97 83 66 62 85 82 77 97 72 65 54 76 88 101 90 67

Readme

Source
raw.​githubusercontent.​com

Sublime Terminal

Shortcuts and menu entries for opening a terminal at the current file, or the current root project folder in Sublime Text.

Features

  • Opens a terminal in the folder containing the currently edited file
  • Opens a terminal in the project folder containing the currently edited file

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 Press ctrl+shift+t on Windows and Linux, or cmd+shift+t on OS X
  • Open Terminal at Project Folder Press ctrl+alt+shift+t on Windows and Linux, or cmd+alt+shift+t on OS X

In addition to the key bindings, terminals can also be opened via the editor context menu and the sidebar context menus.

Package Settings

The default settings can be viewed by accessing the Preferences > Package Settings > Terminal > Settings – Default menu entry. To ensure settings are not lost when the package is upgraded, make sure all edits are saved to Settings – User.

  • terminal
    • The terminal to execute, will default to the OS default if blank. OS X users may enter iTerm.sh to launch iTerm if installed.
    • Default: “”
  • parameters
    • The parameters to pass to the terminal. These parameters will be used if no custom parameters are passed via a key binding.
    • Default: []

Examples

Here are some example setups:

Cmder on Windows

{
  // Replace with your own path to cmder.exe
  "terminal": "C:\\Program Files\\cmder_mini\\cmder.exe",
  "parameters": ["/START", "%CWD%"]
}

xterm on GNU/Linux

{
  "terminal": "xterm"
}

iTerm on OS X

{
  "terminal": "iTerm.sh"
}

iTerm on OS X with tabs

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

iTerm2 v3 on OS X

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

Custom Parameters

With the parameters argument to the open_terminal and open_terminal_project_folder commands, it is possible to construct custom terminal environments.

The following is an example of passing the parameters -T 'Custom Window Title' to a terminal. Please note that this example is just an example, and is tailored to the XFCE terminal application. Your terminal may use the -T option for some other features or setting. Custom key bindings such as this would be added to the file opened when accessing the Preferences > Key Bindings – User menu entry (the file name varies by operating system).

{
  "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%"]
  }
}