How can I search for all of the usage of one text in GoLand(It is a text, not a function or something)

huangapple go评论81阅读模式
英文:

How can I search for all of the usage of one text in GoLand(It is a text, not a function or something)

问题

当我今天阅读一个很棒的程序时,我想找出在fmt.Println()中一个文本的所有用法,但我不知道如何在GoLand中做到这一点。
我们可以使用"⌥ ⌘ F7"来搜索一些函数或其他内容。例如,fmt.Println()

但是当我想要找到fmt.Println()中的文本时,我无法做到。
但是我可以在VsCode中搜索文本。

所以,问题出在哪里?如果有人能告诉我,我将不胜感激。

英文:

When I read a great program today, I wanted to find out all of the usage of one text in fmt.Println(), but I didn't know how to do that in GoLand.
We can use "⌥ ⌘ F7" to search for some functions or other things. fmt.Println() for example.

How can I search for all of the usage of one text in GoLand(It is a text, not a function or something)

But I can't do it when I want to find the text in fmt.Println()
How can I search for all of the usage of one text in GoLand(It is a text, not a function or something)

But I can search the text in VsCode
How can I search for all of the usage of one text in GoLand(It is a text, not a function or something)

So, what's the problem? I would appreciate it if somebody could tell me.

答案1

得分: 1

如果你想在项目中的任何地方查找特定的字符串,请考虑使用"在文件中查找"。你可以使用文件掩码和过滤器来缩小搜索范围,比如"在字符串文字中"的过滤器和.*go的文件掩码。

如果你想在特定的文件中查找字符串,请使用"查找"功能。

英文:

If you want to find a particular string anywhere in a project, consider using "Find in Files". You might want to narrow your search using file masks and filters like "In string literals" filter and .*go file mask.

How can I search for all of the usage of one text in GoLand(It is a text, not a function or something)

If you are looking for a string in a particular file, use "Find".

答案2

得分: 1

你可以使用全局搜索进行搜索:

Mac:⌥ ⌘ F

Windows:Ctrl+Shift+F

英文:

You can search by using global search:

Mac: ⌥ ⌘ F

Windows: Ctrl+Shift+F

huangapple
  • 本文由 发表于 2023年2月24日 20:39:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/75556670.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定