【问题标题】:How to change default save location for Atom in Git Bash?如何在 Git Bash 中更改 Atom 的默认保存位置?
【发布时间】:2021-06-16 23:01:04
【问题描述】:

我最近安装了 Git Bash 并将 Atom 设置为我的默认编辑器 $ git config --global core.editor "atom --wait"

当我尝试在 Git Bash 中创建或编辑 .py 文件时,Atom 可以正常打开,但随后出现此错误(如下)并且我无法使用 -add 或 commit 命令。有截图。

$ 尝试调用已关闭或 rel 渲染器窗口中的函数 此处提供的功能:对象。 (C:\Users\Maria\AppData\Local\atom\app-1.55.0\resources\app.asar\node_modules\github\lib\worker.js:79:22) 远程事件名称:崩溃、销毁

以下是我的一些数据。

我发现我的错误是由于 Atom 将我的新 py 文件保存在此目录中,而不是我专用的 Git 存储库中造成的。..

例如,free_memory.py 保存在 C:\Users\Maria\AppData\Local\atom\app-1.55.0

而不是 C:\Users\Maria\Git_course\scripts

我已将 ';C:\Users\Maria\AppData\Local\atom\bin' 添加到我的环境变量 PATH...

如何将这些文件保存在 C:\Users\Maria\Git_course\scripts 中(使其成为默认保存位置)? 我也很困惑为什么 Atom 有两个 .exe 文件?一个在 Atom 文件夹中,另一个在主 Atom 文件夹中的 app-1.55 文件夹中?

如何正确配置? 我在 Windows 7 64 位上。

感谢您的建议。

【问题讨论】:

    标签: bash git github atom-editor configuration-files


    【解决方案1】:

    检查这是否与atom/atom issue 19849有关

    这个错误总是在我的 Windows 安装中触发,到目前为止我只找到了一种解决方法:使用 atom --wait --new-window 而不是 atom --wait

    这将复制 Atom 在新窗口中打开提交消息的原始行为,而不是向现有窗口添加选项卡 - 这样我只需关闭该新窗口(就像点击 CTRL 一样简单+W 两次),而不必关闭然后重新打开项目窗口。

    【讨论】:

      猜你喜欢
      • 2015-11-03
      • 2011-12-02
      • 2013-09-13
      • 1970-01-01
      • 1970-01-01
      • 2017-06-11
      • 2017-04-24
      • 2018-04-26
      相关资源
      最近更新 更多