搜索
首页开发工具sublime解决Mac下sublime打不开iTerm2的问题

下面由sublime教程栏目给大家介绍如何解决Mac下sublime打不开iTerm2的问题,希望对需要的朋友有所帮助!

修复Mac下subllime中无法打开iTerm2问题

貌似升级了iTerm2到v3以后就出来这个问题了。在sublime中使用快捷键无法打开iTerm2。但是去除用户设定以后,可以在系统默认的terminal中打开。

具体解决如下:

iTerm 版本:

486d85410c10e65b3cc4ec507206342.png

打开

bbb5b85b26c13e2f6f5c77fd79e4874.png

找到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 &#39;<&#39; 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了!

以上是解决Mac下sublime打不开iTerm2的问题的详细内容。更多信息请关注PHP中文网其他相关文章!

声明
本文转载于:crossingmay。如有侵权,请联系admin@php.cn删除
崇高的文本与vs代码:功能和功能崇高的文本与vs代码:功能和功能May 11, 2025 am 12:20 AM

SublimeText适合追求速度和简洁的开发者,VSCode则适合需要强大扩展性和集成功能的用户。 1.SublimeText以轻量级和快速响应着称,GotoAnything和多重选择功能强大。 2.VSCode以扩展性和IDE功能着称,内置Git和调试工具,IntelliSense提升开发效率。

崇高文本:插件和软件包的功能崇高文本:插件和软件包的功能May 10, 2025 am 12:17 AM

SublimeText的插件和包可以通过PackageControl安装和管理,提升编程效率。1.安装插件如BracketHighlighter,通过高亮显示括号匹配,简化代码阅读。2.使用SublimeLinter配置pylint,实现实时代码检查。3.通过SideBarEnhancements自定义侧边栏功能,优化文件管理。

崇高的文字免费吗?了解许可崇高的文字免费吗?了解许可May 09, 2025 am 12:10 AM

SublimeTextisfreeduringanunlimitedtrial,buta$99licenseisrecommendedforregularuse.1)Thetrialallowsfullfeatureaccesswithouttimelimits.2)Alicenseoffersperpetualuse,futureupdates,andremovespurchasereminders,enhancingproductivityandsupportingdevelopers.

崇高文本:增强您的编码工作流程崇高文本:增强您的编码工作流程May 08, 2025 am 12:19 AM

SublimeText能大幅提高工作效率。1)多重选择和多重光标功能允许同时编辑多个位置,2)命令面板提供快速功能访问,3)宏和片段可自动化常用操作,4)优化配置和快捷键使用能提升性能和效率。

崇高的文字:免费尝试,不一定可以自由拥有崇高的文字:免费尝试,不一定可以自由拥有May 07, 2025 am 12:02 AM

SublimeText提供免费试用,但最终需要付费购买永久授权。1)免费试用期间,用户可体验其功能,但会收到购买提示。2)购买后,用户可永久使用,无需订阅费,且可访问更多插件和主题。

崇高的文字:比较付费和无薪功能崇高的文字:比较付费和无薪功能May 06, 2025 am 12:07 AM

ThemaindifferencesbetweenthepaidandunpaidversionsofSublimeTextaretheremovalofstatusbarremindersandoccasionalpop-uppromptsinthepaidversion.1)Unregisteredversion:fullyfunctionalwithallcorefeatureslikesyntaxhighlighting,codecompletion,andcommandpalette,

崇高的文字:强大的编辑的成本崇高的文字:强大的编辑的成本May 05, 2025 am 12:04 AM

SublimeText值得购买。1)其简洁界面和强大功能,如多行编辑和GotoAnything,提升开发效率。2)丰富的插件生态系统,如Anaconda,增强开发体验。3)虽然价格为70美元,但其性能和流畅度对专业开发者物超所值。

崇高文本:代码完成,语法突出显示等等崇高文本:代码完成,语法突出显示等等May 04, 2025 am 12:04 AM

SublimeText因其强大的代码补全和语法高亮功能深受开发者喜爱。1)代码补全能自动提示函数名、变量名等,提升编程效率。2)语法高亮通过不同颜色区分代码元素,提高可读性和错误发现速度。

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

Video Face Swap

Video Face Swap

使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

WebStorm Mac版

WebStorm Mac版

好用的JavaScript开发工具

SublimeText3汉化版

SublimeText3汉化版

中文版,非常好用

mPDF

mPDF

mPDF是一个PHP库,可以从UTF-8编码的HTML生成PDF文件。原作者Ian Back编写mPDF以从他的网站上“即时”输出PDF文件,并处理不同的语言。与原始脚本如HTML2FPDF相比,它的速度较慢,并且在使用Unicode字体时生成的文件较大,但支持CSS样式等,并进行了大量增强。支持几乎所有语言,包括RTL(阿拉伯语和希伯来语)和CJK(中日韩)。支持嵌套的块级元素(如P、DIV),

SublimeText3 Mac版

SublimeText3 Mac版

神级代码编辑软件(SublimeText3)

PhpStorm Mac 版本

PhpStorm Mac 版本

最新(2018.2.1 )专业的PHP集成开发工具