gpt4 book ai didi

git-bash - 在 Windows 终端中双击以选择文本仅选择一个单词

转载 作者:行者123 更新时间:2023-12-03 14:57:45 26 4
gpt4 key购买 nike

我正在尝试设置新的 Windows 终端以使用 git-bash。这是我目前的个人资料:

{
"guid": "{00000000-0000-0000-ba54-000000000002}",
"tabTitle": "Git Bash",
"copyOnSelect": true,
"acrylicOpacity" : 0.75,
"closeOnExit" : true,
"colorScheme" : "Campbell",
"commandline" : "\"%PROGRAMFILES%\\git\\bin\\bash.exe\" --login -i -l",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "Consolas",
"fontSize" : 12,
"historySize" : 9001,
"name" : "Git Bash",
"padding" : "0, 0, 0, 0",
"snapOnInput" : true,
"startingDirectory" : "C:\\git",
"useAcrylic" : false,
"wordDelimiters": ":",
"icon" : "%PROGRAMFILES%\\git\\mingw64\\share\\git\\git-for-windows.ico"

使用 Windows 终端的一个缺点是,当使用双击选择文本时,它只选择一个单词,而不是更智能的选择(如完整路径)。

我尝试使用设置“ wordDelimiters: ”,设置如下:
`wordDelimiters: ":"` 

或者
`wordDelimiters: "()'-:,.;<>~!@#$%^&*|+=[]{}~?"`

但它似乎对双击时选择的文本没有任何影响。

双击“我的”时的预期行为是它选择整个路径(包括文件名)。相反,它只是选择“我的”。
路径/到/我的/file.txt

有谁知道如何让它工作,就像在原生 git-bash 中一样?

最佳答案

wordDelimiters在您的 settings.json 的全局部分中设置文件,不在“profiles”数组中。我终于通过查看文件顶部的文档链接弄清楚了这一点,这可能是尝试添加新设置时查看的好地方。

//有关这些设置的文档,请参阅:https://aka.ms/terminal-documentation

enter image description here

关于git-bash - 在 Windows 终端中双击以选择文本仅选择一个单词,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60441221/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com