Sublime Forum

(Nevermind found it, please ignore ---> Search within a selection(s)?

#1

Is this possible?

Say I have text like this:

<html
  <a class=... href=...
  <p...
  <div...
  <a id= class=... href=...
  <a href=...
  <p class=... 

I set the cursors to each <a tag. Perhaps I have selected the entire line, or maybe just the cursor rests before each <a.

I want to move each cursor forward to the href= attribute. I cannot use arrow keys the hrefs are in different places.

Your answer might be to select href instead of <a… - No that’s not what I’m asking.

Lets say I want to move the cursor forward to the next class= attribute. I am asking to advance the search forward from a pre-selected position.

Ideally what I really want is a little more complicated. I want to move the cursor forward to then next position I find through a search and to also fail to find that search within the selection, when this occurs I want that cursor to go away. Say I highlight the entire line (or whatever) of each <a tag. Now I want to advance the cursor to the class= attribute. I want to not select the class= from the <p tag in the example, because the <p tag was never highlighted so the search on this selection would fail and the cursor disappears allow the other selections to exist.

0 Likes