记Windows与MSYS2的磨合

这篇博客记录了在Windows上整合MSYS2时遇到的问题,包括Git Bash右键菜单消失的解决办法,通过修改环境变量使GVim识别Git,VS Code对Git支持的调整,以及GVim与MSYS2 Vim配置共享的解决方案。通过在注册表和环境变量中进行设置,实现了工具间的顺利交互。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

之前Git Bash自带的右键管理菜单怎么没有了?

不用慌张,只需在注册表里加上就可以,其实就是对着Git Bash的照抄。

这里以安装目录d:\msys64,默认shell为zsh为例:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\msys2_shell]
@="MSYS2 Here"
"Icon"="d:\\msys64\\msys2.ico"

[HKEY_CLASSES_ROOT\Directory\Background\shell\msys2_shell\command]
@="C:\\Windows\\System32\\wscript.exe d:\\msys64\\msys2_open.vbs -shell zsh -use-full-path -here"

[HKEY_CLASSES_ROOT\Directory\shell\msys2_shell]
@="MSYS2 Here"
"Icon"="d:\\msys64\\msys2.ico"

[HKEY_CLASSES_ROOT\Directory\shell\msys2_shell\command]
@="C:\\Windows\\System32\\wscript.exe d:\\msys64\\msys2_open.vbs -shell zsh -use-full-path -where \"%1\""

[HKEY_CLASSES_ROOT\sh_auto_file]
@="Shell Script"

[HKEY_CLASSES_ROOT\.sh]
@="sh_auto_file"

[HKEY_CLASSES_ROOT\sh_auto_file\DefaultIcon]
@="d:\\msys64\\mingw32.exe"

[HKEY_CLASSES_ROOT\sh_auto_file\shell]

[HKEY_CLASSES_ROO
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值