在 Mercurial 中指定编辑器 [英] Specify Editors in Mercurial

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

问题描述

一般来说,如果我有一个 W 类型的自定义文件并想使用自定义应用程序/编辑器 X 打开/查看它,当我想编辑/查看该文件时,如何设置 Hg 以调用应用程序 X文件?

In general, if I've got a custom file of type W and want to use custom application/editor X to open/view it how do i set up Hg to call the application X when i want to edit/view the file?

具体示例:我使用 TortoiseHg 来跟踪由自定义应用程序(称为 Kepserver 的 OPC 服务器应用程序)创建的一组文件.Kepserver 创建 .OPF 文件,而 Hg 可以判断文件何时更改,我想使用 Kepserver 应用程序从 Hg Workbench 查看文件.

Specific example: I'm using TortoiseHg to track a set of files, that are created by a custom application, an OPC server application called Kepserver. Kepserver creates .OPF files, while Hg can tell when the files have changed, I'd like to use the Kepserver application to view the files from Hg Workbench.

我看到一个允许我设置编辑器的设置.我指定了 Kepserver 应用程序的路径,但是当我单击工作台中的文件时,它会尝试使用 Kdiff3 执行二进制差异,如何为特定存储库指定编辑器?

I see a setting that allows me to set an editor. I specified the path to the Kepserver application, but when i click on the files in workbench it tries to do a binary diff, using Kdiff3, How can i specify editors for specific repositories?

推荐答案

在 TortoiseHg 工作台中双击文件时的默认行为是运行视觉差异.要在编辑器中打开文件,您必须右键单击该文件并选择Edit Local"或类似选项之一.

The default behavior when double-clicking a file in TortoiseHg workbench is to run a visual diff. To open the file in an editor, you must right-click on the file and select "Edit Local" or one of the similar options.

选择此选项时使用的编辑器由

The editor used when this option is selected is controlled by the

[tortoisehg]
editor = <editor>

在您的 .hgrcmercurial.ini 中设置.

setting in your .hgrc or mercurial.ini.

这篇关于在 Mercurial 中指定编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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