sublime3 打开终端

一、安装terminal包

这就不多说了:

  1. ctrl + shift + p 搜索package install
  2. 弹出package搜索框,在搜索terminal,点击安装即可。

二、配置终端路径

Cmder on Windows

{
  // window下终端路径
  "terminal": "C:\\MyAPP\\cmder\\Cmder.exe",
  //  window下终端参数
  "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"]
}

三、快键键

我不喜欢自定义快捷键,自定义很多时候是多余的,还不如通过cli去操作,另外操作别人的电脑或者别人操作你的电脑,乱配置,谁用得惯?!所以,一般默认就好

  • ctrl+shift+t 打开文件所在文件夹
  • ctrl+shift+alt+t 打开文件所在项目的根目录文件夹
"keys": ["ctrl+shift+t"], 
"command": "open_terminal" ,
"keys": ["ctrl+shift+alt+t"], 
"command": "open_terminal_project_folder" 

四、示例

打开设置

{
// The command to execute for the terminal, leave blank for the OS default
// See https://github.com/wbond/sublime_terminal#examples for examples
"terminal": "C:\\Windows\\System32\\cmd.exe",

// A list of default parameters to pass to the terminal, this can be
// overridden by passing the "parameters" key with a list value to the args
// dict when calling the "open_terminal" or "open_terminal_project_folder"
// commands
"parameters": ["/START", "%CWD%"],

// An environment variables changeset. Default environment variables used for the
// terminal are inherited from sublime. Use this mapping to overwrite/unset. Use
// null value to indicate that the environment variable should be unset.
"env": {},

"keys": ["ctrl+shift+t"], "command": "open_terminal" ,
"keys": ["ctrl+shift+alt+t"], "command": "open_terminal_project_folder" ,

}

 

posted @ 2020-06-26 21:29  1769987233  阅读(882)  评论(0编辑  收藏  举报