Search code examples
visual-studio-codemultiline

Visual Studio Code multiline select until a character


I would like to select all the words at once between the backtick. In MACOSX use alt+ shift and the cursor put a multi cursor at the beginning of the words but I can't stop the selection to the "`" character where the word ends.

  `apples` int(200) NOT NULL,
  `bananas` int(100) NOT NULL,
  `mangos` int(100) NOT NULL,
  `kiwi` int(100) NOT NULL,
  `raspberry` int(100) NOT NULL,

Is there a way I can select until some character is found in the line where the cursor is placed? In this case, the expected selection is:

  `apples` 
  `bananas`
  `mangos`
  `kiwi`
  `raspberry`

Solution

    • Press command+F to open the find widget.

    • Type `.*?` in regex mode (.* icon).

    • Press command+shift+L to select all occurrences.

    • Press esc to close the find widget.