Go to the top of the page

I recently migrated from Sublime Text 3 to WebStorm 11, and I don’t have a key function when choosing an entry of the same choice:
Ability to skip a selection (using the hotkey).

Use case

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

Selecting the first item and pressing Ctrl + G (Mac) will begin to select the occurrences of item inside the properties of the object, and I want to select only item immediately after const and inside console.log . Essentially, I want to skip two item events inside an object.

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

+5
source share
2 answers

Select the text you want to change:

first choice

Ctrl+G will find the following occurrence of the selected text and select it:

second choice

Cmd+G will cancel the current selection and select the following:

third choice

Cmd+G once again disable the current selection and select the following:

final choice

For those who have another Keymap:

Cmd+G : "Find Next / Go To Next Event"

Ctrl+G : "Add selection for next event"

+8
source

Currently, the only solution found is Find:

  • Select the text and press Cmd + F (the search bar will open with the selected text as a search)
  • Press Cmd + G to select the next occurrence
  • Press Enter to skip it (select the next occurrence)
  • Press Enter again
  • Press Esc to exit search context

And now the necessary elements are selected and ready for editing.

At least this is possible, but I would expect the hotkey to simply skip the current event.

0
source

Source: https://habr.com/ru/post/1245104/


All Articles