【问题标题】:Git core.editor on Mac OS XMac OS X 上的 Git core.editor
【发布时间】:2010-12-26 06:08:23
【问题描述】:

如何更改 Git 的 core.editor 以启动 Smultron 等程序?

我能找到的只是终端编辑器或 TextMate 的示例。

【问题讨论】:

    标签: git text macos text-editor


    【解决方案1】:

    您可以使用open 在 Smultron 中打开文件

    例子

    git config core.editor "open -nW -a Smultron"
    

    编辑

    添加了-nW 参数以打开新的 Smultron 并等待其关闭

    【讨论】:

    • 这会打开 Smultron,尽管 git 提前退出并返回:“Aborting commit due to empty commit message。”
    • 另外 --global 将是一个好主意,否则您可能会为当前项目设置编辑器。
    • 谢谢!工作完美。似乎 Smultron 在开发方面没有更多支持。嗯。
    • 打开 Komodo 编辑类型 git config core.editor "open -nW -a 'Komodo Edit'"
    【解决方案2】:

    您只能看到终端和 TextMate 示例,因为 TextMate 提供了一个终端程序来从命令行与其交互。如果 Smultron 提供了类似的程序,您可以像使用“mate”一样使用它。如果不是,那么您不能让 Smultron 与 core.editor 一起工作。

    【讨论】:

    • 你知道其他有这种命令的文本编辑器吗?
    猜你喜欢
    • 2011-10-12
    • 1970-01-01
    • 1970-01-01
    • 2011-12-27
    • 2015-04-02
    • 2023-03-06
    • 2011-08-24
    • 2012-08-09
    • 1970-01-01
    相关资源
    最近更新 更多