Re: Any Way To Make XCode 4 search XIB files?
Re: Any Way To Make XCode 4 search XIB files?
- Subject: Re: Any Way To Make XCode 4 search XIB files?
- From: Keary Suska <email@hidden>
- Date: Thu, 29 Nov 2012 16:15:25 -1000
On Nov 29, 2012, at 2:48 AM, Praveen S wrote:
>
> On Nov 21, 2012, at 12:27 AM, Keary Suska wrote:
>
>> On Nov 20, 2012, at 1:55 AM, Praveen S wrote:
>>
>>> What about ack (better than grep) or grep command :)
>>> On Jun 21, 2011, at 9:19 AM, Nikolaus Heger wrote:
>>>
>>>> I've run into this a few times: Global search (Shift-F) doesn't look in XIB files.
>>>>
>>>> Which is not so good when I am searching for resources, or class names.
>>>>
>>>> Is there any way to make it? I know there's a bunch of search options but they all seem to automatically exclude XIB files.. the only way I have found to make it work is by searching the root directory, but that also finds all sorts of svn files.
>>
>> The short answer is no, but there are options. As for 3rd party solutions, I will throw in BBEdit as a powerful option. In Xcode alone, I sometimes use the refactor->rename process to see how a known class is being used across a project.
>
> BBEdit? Is it free? To just accomplish a small work why do we need 3rd party solutions. I just wrote a small script using ack which just find and replace the text in matching files ( including xib files).
It is not free, but IMHO worth every penny when you need to do complex search/replace across multiple files. It is way faster and the interface is superior to Xcode in just about every way. The UI can be expanded to full screen size, supports full PCRE regular expressions, allows a user to store frequently used expressions, has unlimited undo for open documents, and much more. Not to say it doesn't have its share of annoyances, but it is the tool I turn to when I need to do complex search/replace where Xcode is just too painful to use.
I can only speculate as to why xibs were removed from search/replace support, but I imagine it is minimally because while a simple class or method rename is pretty straightforward, it would be far to easy to completely break the xib with a careless replace. And I (with further speculation) wouldn't say this is Apple trying to save Developers from themselves as not Apple wanting to be blamed for their tool wreaking havoc where it really shouldn't.
Now, this could all be solved with a consistent and well-documented xib layout but that is another ball of wax...
This issue prompts an aside: xib editing--especially search/replace--should be entertained with great caution. Even so that even Apple will only do it in specific circumstances (refactoring).
HTH,
Keary Suska
Esoteritech, Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden