Sublime Forum

MacOS Find doesn't work in unsaved files

#1

Steps to reproduce:

  1. Create a blank unsaved document in Sublime.
  2. Paste any chunk of text.
  3. Open the Find bar
  4. Enter text that should be matched
  5. Click Find
  6. Observe "Unable to find text"
  7. Save the file somewhere
  8. Repeat Find
  9. Observe text is found

I’m using build 4200 on Mac OS Sequoia with an M2 processor. I have not seen this on my Ubuntu system running the same version

0 Likes

#2

Are you using Find in Files or just Find?
If the former, what is in your Where filter? Probably you need to cleck the 3 dots to the right and select Open files to search unsaved contents also

0 Likes

#3

Works perfectly for me, using ‘Find …’ on a Mac, with an unsaved file:

NB: As @kingkeith mentions, by default ‘Find in files’ assumes that all files are saved and in the project, but this can be configured by choosing Open Files:

0 Likes

#4

I’m just trying to perform a find in a plain text file, not across files.

0 Likes

#5

It looks like you have “wrap” disabled (the fourth button on the left), which means that when you start searching with the caret at the end of the file it won’t wrap around and search from the front.

2 Likes

#6

Thank you!

I only ever use the regex toggle, so I assumed they were set to what they have always been set to.

I neglected to add “have a kitten walk over your laptop” to my steps to reproduce! :laughing:

0 Likes

#7

Your theme seems to make the enabled/disabled buttons far more apparent. I imagine if I’d had that on both of my installs, I would have noticed the difference. Is that provided by a Sublime package? I usually go with “whatever the app provides” but this looks like something I could use since the kitten isn’t going anywhere.

0 Likes

#8

Here are the relevant theming settings from my Preferences.sublime-settings

{
   ...
	"theme": "Gravity One.sublime-theme",
	"color_scheme": "Monokai Gravity.sublime-color-scheme",
	"font_face": "Maple Mono NF",
   ...
}
1 Like