Sublime Forum

Find and replace pattern lost when closing window

#1

Using sublime text 3 build 3143, it didn’t happen until I updated to the latest version.

The search and replace pattern is lost and it’s a pretty long one I use for all the projects since it’s a react native project I exclude ios/android/node_modules etc from the search pattern, also *min.js, *pack.js, etc, why do I need to add these again every time? It wasn’t like this before.

Thanks.

2 Likes

#2

This is happening to me too, ideally Sublime should have a way to store this on the project file. This is the only thing I find quite annoying about ST.

1 Like

#3

it should store it in the project’s workspace file if you have saved it

0 Likes

#4

I never used the project workspace that I know of, and I’ve been using ST for several years now, is that stored in the home folder? I haven’t seen anything like the .idea folder in the project’s root.

0 Likes

#5

I think you explicitly need to save it: Project menu -> Save workspace

0 Likes

#6

I’m not going to start doing that now after years of using ST without having to save any kind of project data, why can’t it just keep the last one you modified like it used to? If I’m going to start doing that might as well switch to a full blown IDE like idea

0 Likes

#7

So the only solution is to downgrade? Still waiting for a fix on this.

0 Likes

#8

I also find this annoying and frustrating.

I was able to get the “workspace” solution suggested by @kingkeith to work. Here’s what I had to do:

  1. Open my folder: subl .
  2. Project > New workspace for project
  3. Save as myproj.sublime-workspace
  4. Do a find-all with a where pattern, and actually run the search
  5. Close Sublime
  6. View the .sublime-workspace file, and you can see the pattern under find_in_files.where_history
  7. Open the workspace explicitly: subl myproj.sublime-workspace
  8. Do a find-all, see that the where pattern is now there.

It didn’t work until I actually ran a search, and it doesn’t work if I just open the directory with subl ., I have to explicitly open the workspace file.

This is annoying and I wish it had the old behavior :frowning:

0 Likes

#9

I do have a project workspace file and I save it manually myself. ST does not save it for me.

0 Likes

#10

Ok, I think didn’t paid much attention on what @jasoncrawford wrote (sorry). I wasn’t doing step 7 that’s why I always lost it.

0 Likes