visual-studio-codekeyboard-shortcutsazure-data-studio

Visual Studio Code: Select each occurrence of find


I'm looking for a "select each occurrence of" something I'm trying to find. For example a file has a bunch of text that includes "abc", I type ctrl+f and type abc. I can either find the first one or the next one, but I would like to "multi-cursor" each one in the file.

I've already found the feature that lets me highlight text and ctrl+d to get the next that matches the selection, but if there's a hundred of these things - well that gets quite tiresome.


Solution

  • Ctrl+Shift+L Select all occurrences of current selection

    editor.action.selectHighlights
    

    Ctrl+F2 Select all occurrences of current word

    editor.action.changeAll
    

    Please refer for more information here.