MacVim和Mercurial签到 [英] MacVim and Mercurial check-in

查看:77
本文介绍了MacVim和Mercurial签到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用MacVim作为默认编辑器(显然是在Mac上).我想让MacVim在hg ci时编辑提交消息.不幸的是,当我这样做(通过设置EDITOR=mvimalias vi='mvim')时,MacVim弹出并显示一条空消息(即下半部分没有样板),并且当我保存该提交消息时,出现错误中止:空的提交消息".

I'm trying to use MacVim as a default editor (on my Mac, obviously). I'd like to have MacVim to edit commit messages when I hg ci. Unfortunately when I do so (either by setting EDITOR=mvim or alias vi='mvim') MacVim pops up with an empty message (i.e. none of the boilerplate in the bottom half), and when I save that commit message I get the error "abort: empty commit message".

在通过Mercurial签入更改时,是否可以使用MacVim(可能通过mvim)来编辑提交消息?

Is there a way to use MacVim (presumably via mvim) to edit the commit messages when checking in changes with Mercurial?

感谢您阅读,我期待阅读答案.

Thank you for reading, and I look forward to reading the answers.

布莱恩

推荐答案

根据常见问题解答,使其可与Git一起使用:

Set EDITOR='mvim -f', per the tip from the FAQ for making it work with Git:

如何使用MacVim编辑Git提交消息?

将以下行添加到文件~/.profile:

export EDITOR='mvim -f -c "au VimLeave * !open -a Terminal"'

最后一部分确保在关闭提交消息后,终端再次获得焦点. (请注意,您需要在路径中放入mvim脚本才能使它起作用.)

The last part ensures that Terminal gets focus again after closing the commit message. (Note that you need to put the mvim script in your path for this to work.)

这篇关于MacVim和Mercurial签到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆