Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebStorm skip find occurrence hotkey

Tags:

webstorm

I've recently moved from Sublime Text 3 to WebStorm 11 and I am missing a key feature when selecting occurrences of the same selection:
The ability to skip a selection (with a hotkey).

Use case

const item = { itemValue: 1, itemName: 'one' };
console.log(item.itemValue);

Selecting the first item and pressing Ctrl + G (Mac) will start selecting the item occurrences inside the object properties, and I want to select only the item right after the const and inside the console.log. Essentially, I want to skip the two item occurrences inside the object.

This is a dummy use case to illustrate the point, I know I can Refactor > Rename it.

like image 236
Alex Ilyaev Avatar asked Mar 15 '16 17:03

Alex Ilyaev


1 Answers

Highlight the text you want to edit:

first selection

Ctrl+G will find the next occurrence of the highlighted text and select it:

second selection

Cmd+G will drop the current selection and select the next one:

third selection

Cmd+G one more time will drop the current selection and select the next one:

final selection

For anyone that has a different Keymap:

Cmd+G: "Find Next / Move to Next Occurrence"

Ctrl+G: "Add Selection for Next Occurrence"

like image 139
chrisbajorin Avatar answered Oct 04 '22 12:10

chrisbajorin