英文:
vscode: How to search in installed package?
问题
我想在go-git包中进行搜索。
ctrl+shift+f只在我的模块中搜索。
答案1
得分: 1
可能这不是直接的答案,但这是一个我个人喜欢的解决方法:
在VS Code中,将鼠标悬停在来自外部包的函数上,VS Code会显示godoc描述。通常会有一个指向pkg.go.dev的链接(这个链接是针对PlainClone
示例的):
点击链接后,你会直接跳转到GO的包网站。在那里已经有一个很好的模块函数列表。
如果你想深入了解:
在仓库的顶部有一个指向仓库托管站点的链接。
经验表明,这通常是GitHub。虽然GitHub的搜索曾经是被禁止的,但现在它可以成为一个强大的工具:
再次提醒,这是非常主观的,但GO在本地存储模块的复杂方式以及它的许多环境变量等等,让我觉得使用互联网更加方便舒适 =)
英文:
Probably this will not directly answer, but it's an workaround, that I personally prefer:
Hovering over a function, that is from a foreign package, VS Code shows the godoc description. There is always a link to pkg.go.dev (This link is for the PlainClone
example):
Following it you are redirected directly to GO's package website.
Here is already a nice list with the module's functions.
if you want to dive deeper:
On the top of the repository there is the link to the repo host.
Experiences show, that this is mostly Github. While GitHub's search used to be proscribed, it can nowadays be a mightful tool:
Again I mention that is very subjective, but GO's complex way of storing modules locally with it's many env variables and stuff made me feel using the internet is more comfortable =)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论