英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论