[英]meld doesn't automatically open at the forefront
I am using MacBook Pro.我正在使用 MacBook Pro。 I have set up git difftool to work with meld.
我已经设置了 git difftool 来使用 meld。 Here is my ~/.gitconfig:
这是我的 ~/.gitconfig:
[diff]
tool = meld
[difftool]
prompt = false
[difftool "meld"]
trustExitCode = true
cmd = open -W -a Meld --args \"$LOCAL\" \"$PWD/$REMOTE\"
[merge]
tool = meld
[mergetool]
prompt = false
[mergetool "meld"]
trustExitCode = true
cmd = open -W -a Meld --args --auto-merge \"$PWD/$LOCAL\" \"$PWD/$BASE\" \"$PWD/$REMOTE\" --output=\"$PWD/$MERGED\"
When I do git difftool, meld launches in the background.当我执行 git difftool 时,meld 在后台启动。 I have to click on the meld icon to view the diffs.
我必须单击融合图标才能查看差异。 (Command + Tab doesn't work) And when I close one file, another file opens up in the background again.
(Command + Tab 不起作用)当我关闭一个文件时,另一个文件再次在后台打开。 So I have to click on the meld icon again to see the diffs.
所以我必须再次点击融合图标才能看到差异。
While this technically works, it's very inconvenient.虽然这在技术上有效,但非常不方便。 I was wondering if there is a way to fix this issue so that meld will launch the diffs at the forefront.
我想知道是否有办法解决这个问题,以便融合将在最前沿启动差异。
Still haven't figured out how to open meld in the forefront.还没有弄清楚如何在最前沿打开融合。 But when I do Command + q to quick meld, it opens up another file automatically in the forefront.
但是当我执行 Command + q 快速融合时,它会在最前面自动打开另一个文件。 So that helps.
所以这有帮助。
its not a fix, but it's a decent work around that has worked for me.它不是一个修复程序,但它是一项体面的工作,对我有用。
This message was written by munepi (probably easier to read in the original post )此消息由munepi撰写(在原始帖子中可能更易于阅读)
move the original Mac-port starter script to Meld.distro below.
将原始的 Mac 端口启动脚本移动到下面的 Meld.distro。
$ mv/Applications/Meld.app/Contents/MacOS/Meld
/Applications/Meld.app/Contents/MacOS/Meld.distro
make a wrapper/Applications/Meld.app/Contents/MacOS/Meld
of theMeld.distro
below/Applications/Meld.app/Contents/MacOS/Meld.distro
为下面的Meld.distro
做一个包装器/Applications/Meld.app/Contents/MacOS/Meld
#!/bin/bash
##
# $ sudo xattr -r -d com.apple.quarantine /Applications/Meld.app/
## standard plist settings: OK
# ~/Library/Preferences/org.gnome.meld.plist
# $ defaults read org.gnome.meld
# $ defaults write org.gnome.meld "/org/gnome/meld/use-system-font" 0
# $ defaults write org.gnome.meld "/org/gnome/meld/custom-font" "Ricty, 18"
##FIXME: ad-hoc cleanup Meld settings (cd ${HOME} rm -rf ./.local/share/meld
#rm -f ./Library/Preferences/org.gnome.meld.plist rm -rf "./Library/Saved Application State/org.gnome.meld.savedState/" )
# export G_ENABLE_DIAGNOSTIC=1 # 0 or 1
# export GTK_THEME=Adwaita # Adwaita or Adwaita:dark
# export GTK_DEBUG=interactive logger "/Applications/Meld.app/Contents/MacOS/Meld.distro" exec "/Applications/Meld.app/Contents/MacOS/Meld.distro" $@
Then,
$ chmod +x /Applications/Meld.app/Contents/MacOS/Meld
然后,
$ chmod +x /Applications/Meld.app/Contents/MacOS/Meld
I remark that
我说
you are available some GTK-related environment variables inside the above wrapper Meld: G_ENABLE_DIAGNOSTIC, GTK_THEME, GTK_DEBUG.
您可以在上述包装器 Meld 中使用一些与 GTK 相关的环境变量:G_ENABLE_DIAGNOSTIC、GTK_THEME、GTK_DEBUG。 you are also available some tips commented in the above wrapper Meld if necessary.
如有必要,您还可以在上面的包装器 Meld 中评论一些提示。 I also have posted how to use/change custom-font with Meld plist settings in Issue Can't change font #38.
我还在 Issue Can't change font #38 中发布了如何通过 Meld plist 设置使用/更改自定义字体。 The plist file ~//Library/Preferences/org.gnome.meld.plist is just the one.
plist 文件 ~//Library/Preferences/org.gnome.meld.plist 就是其中一个。 Please check and try the post if necessary.
如有必要,请检查并尝试该帖子。
I had to change my.gitconfig as below我不得不改变 my.gitconfig 如下
[mergetool]
prompt = false
[mergetool "meld"]
trustExitCode = true
cmd = /Applications/Meld.app/Contents/MacOS/Meld --auto-merge \"$PWD/$LOCAL\" \"$PWD/$BASE\" \"$PWD/$REMOTE\" --output=\"$PWD/$MERGED\"
more info/tips can be found here: https://github.com/yousseb/meld/issues/73#issuecomment-447728538更多信息/提示可以在这里找到: https://github.com/yousseb/meld/issues/73#issuecomment-447728538
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.