Sublime Forum

Find replace broken in 2162?

#1

I needed to do a simple find/replace, as shown:

https://img.skitch.com/20120109-qjeu2ms9h3urdq5j2t61x25qab.jpg

However, once I click “replace all” the ENTIRE “p” tag is replaced with “>”, breaking my code:

https://img.skitch.com/20120109-nisme96gx4qremger759cwm5x5.jpg

0 Likes

#2

It does this in 2139 too, so I must be doing something wrong here. Not sure what.

0 Likes

#3

Check the options on the last side of the find and replace panel. Make sure Regular Expressions and Whole Word are turned off and Wrap is turned on.

0 Likes

#4

They are:

https://img.skitch.com/20120109-d2a6am4tj6gqbgyh9msthyptx4.jpg

0 Likes

#5

Perhaps it’s related to word wrap, try turning it off and see if that helps…

0 Likes

#6

Turned off all options, same result as original screen shot.

0 Likes

#7

Can you provide some example text where it’s doing the wrong thing?

0 Likes

#8

[quote=“handycam”]

Turned off all options, same result as original screen shot.[/quote]

I meant word wrap on the file. View > Word Wrap

0 Likes

#9

I attached the file.

I was searching for p class="Normal para-style-override-1" and replacing with p class="Normal"

And instead the replacement was simply >
CH00–FOB-1.zip (9.39 KB)

0 Likes

#10

It’s working properly when I try here.

0 Likes

#11

I just downloaded the file and tried it at home, it works. I will try it at work tomorrow, maybe something is screwy with my install there.

0 Likes

#12

Yes, for some reason it does NOT work at work. Same build of ST2, same packages and user files. Not sure why. Thoughts?

0 Likes

#13

I found the problem.

There was hidden text in the REPLACE field. At one point, I was find/replacing multiline text, and the last line had a return – so the block of text was pushed up and hidden in the replace dialog. I had to stretch it very tall to “clean it out”.

Perhaps the default behavior of focusing a find or replace field would be to select the whole contents? This way, hitting delete will clear it.

0 Likes