Sublime Forum

Find Replace Bug With Preserving Case

#1

Sublime Text 2 Build 2127
Linux Mint 11

This has existed for months, but I haven’t reported it because I figured it would eventually go away, but it hasn’t.

Text: <label for="field">Field Name</label> Replace: field Replace With: someNewField Outputs: <label for="somenewfield">Field Name</label>

Why can’t the lowercase version just copy and insert what’s in the “Replace With” section?

Also, if the text to be replaced has capitalization, then what’s replaced with will have capitalization based on that, so:

Text: <label for="someField">Field Name</label> Replace: someField Replace With: anotherField Outputs: <label for="anotHerfield">Field Name</label>

As you can see, this output is even less desirable.

I’ve tried playing with the replace filters, but they don’t help. Is there some configuration I can edit to make the search and replace work like I want?

0 Likes

#2

There is a button “Preserve Case” which does exactly that. Unchecked :question: :unamused:

0 Likes

#3

I must be retarded, I could have sworn it did that even with it unchecked, but I just tried and it works like I want. Thanks.

0 Likes