下面由sublime教程栏目给大家介绍如何解决Mac下sublime打不开iTerm2的问题,希望对需要的朋友有所帮助!
修复Mac下subllime中无法打开iTerm2问题
貌似升级了iTerm2到v3以后就出来这个问题了。在sublime中使用快捷键无法打开iTerm2。但是去除用户设定以后,可以在系统默认的terminal中打开。
具体解决如下:
iTerm 版本:
打开
找到terminal>iTerm.sh
编辑iTerm,把如下内容替换进去。
#!/bin/bash # Modified following this issue: https://github.com/wbond/sublime_terminal/issues/89 CD_CMD="cd "\\\"$(pwd)\\\"" && clear" if echo "$SHELL" | grep -E "/fish$" &> /dev/null; then CD_CMD="cd "\\\"$(pwd)\\\""; and clear" fi VERSION=$(sw_vers -productVersion) OPEN_IN_TAB=0 while [ "$1" != "" ]; do PARAM="$1" VALUE="$2" case "$PARAM" in --open-in-tab) OPEN_IN_TAB=1 ;; esac shift done if (( $(expr $VERSION '<' 10.7) )); then RUNNING=$(osascript<<END tell application "System Events" count(processes whose name is "iTerm") end tell END ) else RUNNING=1 fi if (( ! $RUNNING )); then osascript<<END tell application "iTerm" tell current window tell current session of (create tab with default profile) write text "$CD_CMD" end tell end tell activate end tell END else if (( $OPEN_IN_TAB )); then osascript &>/dev/null <<EOF tell application "iTerm" if (count of windows) = 0 then set theWindow to (create window with default profile) set theSession to current session of theWindow else set theWindow to current window tell current window set theTab to create tab with default profile set theSession to current session of theTab end tell end if tell theSession write text "$CD_CMD" end tell activate end tell EOF else osascript &>/dev/null <<EOF tell application "iTerm" tell (create window with default profile) tell the current session write text "$CD_CMD" end tell end tell activate end tell EOF fi fi
记得这里的用户设置为(Sublime Text -> Preferences -> Package Settings -> Terminal -> Settings-User)
{ "terminal": "iTerm.sh", "parameters": ["open_terminal_project_folder"] }
这样,我们又可以愉快的在sublime里启动iTerm2了!
The above is the detailed content of Solve the problem that sublime cannot open iTerm2 on Mac. For more information, please follow other related articles on the PHP Chinese website!

To run Sublime Text, you need to download, install the application, purchase a license (optional), and then launch the application. Create or open a file to start encoding.

Sublime Text can be Chineseized through the following steps: 1. Download the Chinese package; 2. Install the Chinese package; 3. Restart Sublime Text; 4. Set the default language (optional); 5. Verify the Chinese version.

There are two ways to delete plugins in Sublime Text: Delete through the Plug-in Manager: Select the plug-in you want to delete and right-click and select "Delete". Manually Delete: Navigate to the user data directory, locate the plugin folder and drag it to the Recycle Bin or Trash.

To write code using GBK encoding in Sublime Text, you need to: 1. Set the project encoding to GBK; 2. Create a new file; 3. Select GBK encoding when saving as; 4. Enter the code using GBK encoding.

sublime can be translated into Chinese as: 1. Sublime, sacred; 2. Extreme, extraordinary; 3. Indescribable, awesome; 4. Sublime thought.

The steps to purchase a Sublime Text registration code are as follows: Visit the website and select "Buy". Select the license type and enter information. Pay and receive emails containing registration codes. Open Sublime Text, go to the License menu and paste the registration code. Click Register to activate your registration code and advanced features.

Sublime Text provides a variety of ways to save code, including shortcut keys (Ctrl S), menu bar (File > Save), toolbar (disk icon), and command panel (Ctrl P). In addition, it also provides an automatic save function, which can automatically save open files regularly.

Use arrow functions to define anonymous functions in Sublime Text concisely and quickly, with the syntax: (parameter list) => expressions. The advantages include simplicity, readability, scope inheritance and closure functions. Notes include extension operators and this keyword limitations, and the need for explicit return statements for multi-line functions.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Zend Studio 13.0.1
Powerful PHP integrated development environment

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver CS6
Visual web development tools