Sublime Text 3 cannot find text that is clearly there

By pressing cmd + f to find the text in SublimeText, I often see something like:

enter image description here

Clearly, there is "someText" on the page. Why can't Sublime find this?

Please note that sometimes it works, and sometimes it doesn’t work. However, I cannot figure out the difference.

How can I reliably find text with Sublime Text?

+5
source share
3 answers

I tried to reproduce this problem with Sublime Text 2, and here is what I found:

  • If you place a carriage in front of the text and the hit found, the text will be found.
  • If you put a carriage after the text and then click Find, the text will not be found

Sublime Text doesn't seem to wrap the search by default. You can turn it on by switching the arrow button (the second to the left of β€œFind What,” its prompt should say β€œWrap”). Then the search is performed regardless of the position of the carriage.

+11
source

Look at the buttons right in front of the search box. Sometimes they just accidentally become disconnected, erroneous or short, and then the search does not behave as expected.

From left to right, RegExp, case, whole word, wrapper (search for the entire document, not just below the current line), you can see them with the mouse pointer.

I highly recommend that you disable these shortcuts to prevent these switching unexpectedly :)

+3
source

Also, turning off regular expressions can help you find characters that are particularly significant in regular expressions. For example, someText (foo) will not be searchable in regex mode without escaping brackets or placing the search string in quotation marks.

+1
source

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


All Articles