选择所有出现的单词未完全工作

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

Select all occurrences of select word not quite working

问题

I had to reset my VS Code settings back to defaults and I'm finding the ability to select text and find all occurrences of that text is not quite working as it used to. In the screenshot below, after selecting BaseTemplate inside IBaseTemplateProps on line 3 and then pressing CTRL+D multiple times to add to the multi-cursor selection, it cannot seem to include BaseTemplate in IBaseTemplateProps on line 6.

This is different behavior prior to resetting VS Code settings back to defaults where it would pick up all occurrences even if the selected text was a partial match of longer words. Can anyone confirm this is expected behavior and if not, what non-default setting do I need to change to get that behavior back?

选择所有出现的单词未完全工作

英文:

I had to reset my VS Code settings back to defaults and I'm finding the ability to select text and find all occurrences of that text is not quite working as it used to. In the screenshot below, after selecting BaseTemplate inside IBaseTemplateProps on line 3 and then pressing CTRL+D multiple times to add to the multi-cursor selection, it cannot seem to include BaseTemplate in IBaseTemplateProps on line 6.

This is different behaviour prior to resetting VS Code settings back to defaults where it would pick up all occurrences even if the selected text was a partial match of longer words. Can anyone confirm this is expected behaviour and if not, what non-default setting do I need to change to get that behaviour back?

选择所有出现的单词未完全工作

答案1

得分: 1

它对我来说正常工作。您可能已经在查找小部件中启用了“匹配整个单词”的选项。即使未显示查找小部件,VS Code也会在启用该选项的情况下使用它。

当查找小部件不可见时,当您按下<kbd>Ctrl</kbd>+<kbd>D</kbd>时,其选项将在编辑器的右上角短暂显示。您可以单击“匹配整个单词”选项以禁用它,然后查看它是否按您的预期工作。

英文:

It works as expected for me. You probably have the Match Whole Word option enabled in the Find Widget. VS Code will use that option if enabled even if the Find Widget is not visible.

When the Find Widget is not visible, its options will show briefly in the upper right corner of the editor when you <kbd>Ctrl</kbd>+<kbd>D</kbd>. You can click the Match Whiole Word option to disable it and see if it works as you expect thereafter.

huangapple
  • 本文由 发表于 2023年4月13日 22:35:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/76006705.html
匿名

发表评论

匿名网友

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

确定