Terminal
Launch terminals from the current file or the root project folder
Details
Installs
- Total 862K
- Win 466K
- Mac 208K
- Linux 187K
Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | Jan 8 | Jan 7 | Jan 6 | Jan 5 | Jan 4 | Jan 3 | Jan 2 | Jan 1 | Dec 31 | Dec 30 | Dec 29 | Dec 28 | Dec 27 | Dec 26 | Dec 25 | Dec 24 | Dec 23 | Dec 22 | Dec 21 | Dec 20 | Dec 19 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 59 | 78 | 122 | 103 | 79 | 88 | 76 | 93 | 112 | 103 | 75 | 69 | 73 | 72 | 83 | 93 | 98 | 82 | 69 | 63 | 87 | 100 | 109 | 100 | 93 | 79 | 85 | 92 | 78 | 86 | 81 | 84 | 54 | 41 | 77 | 78 | 82 | 73 | 81 | 46 | 59 | 78 | 75 | 77 | 91 | 89 |
Mac | 15 | 49 | 31 | 30 | 31 | 27 | 31 | 47 | 31 | 34 | 32 | 12 | 15 | 33 | 43 | 37 | 33 | 37 | 19 | 25 | 32 | 42 | 41 | 33 | 41 | 26 | 20 | 23 | 30 | 32 | 44 | 30 | 12 | 10 | 27 | 42 | 27 | 19 | 20 | 14 | 17 | 27 | 35 | 36 | 34 | 27 |
Linux | 13 | 27 | 34 | 29 | 22 | 21 | 29 | 33 | 27 | 27 | 31 | 24 | 25 | 34 | 31 | 31 | 43 | 27 | 26 | 22 | 36 | 49 | 32 | 31 | 33 | 20 | 25 | 32 | 23 | 34 | 31 | 27 | 23 | 17 | 20 | 30 | 31 | 19 | 21 | 19 | 34 | 23 | 22 | 29 | 40 | 21 |
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: []
- env
- The environment variables changeset. Default environment variables used when invoking the terminal are inherited from sublime.
- The changeset may be used to overwrite/unset environment variables. Use
null
to indicate that the environment variable should be unset. - 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"
}
gnome-terminal for CJK users on GNU/Linux
{
"terminal": "gnome-terminal",
// Unset LD_PRELOAD which may cause problems for sublime with imfix
"env": {"LD_PRELOAD": null}
}
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"
}
Hyper on OS X
{
"terminal": "hyper.sh"
}
Windows Terminal
{
"terminal": "C:/Users/yourusername/AppData/Local/Microsoft/WindowsApps/wt.exe",
"parameters": ["-d", "."]
}
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%"]
}
}