Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generic Xcode usage questions

I have 3 general questions related to the usage of xCode. Any help would be greatly appreciated please:

  1. Whenever I open documentation, the left content/index column is always small and I have to drag it wider. Is there a way to permanently set its size?
  2. Is there a way to perform a wildcard search and replace e.g. I have 3 lines: var1Letter = @"A"; var2Letter = @"A"; var3Letter = @"A";

In the above I would like to replace var?letter in 1 go.

  1. How do I set the default SDK?

Thanks.

like image 333
RunLoop Avatar asked Apr 03 '26 00:04

RunLoop


2 Answers

re #2: Xcode can use regular expressions. You need to select the regular expression type though (it usually says textual) and that will let you do a search and replace. Xcode uses the ICU regex syntax.

like image 75
Elfred Avatar answered Apr 08 '26 13:04

Elfred


To do the wildcard search, use regular expressions and use \n in the replacement text.

I'm using Xcode 3.2, but I think that older versions use the same regular expression syntax. Use the Find… (cmd-F) command. Choose "Find & Replace" from the pop-up menu. Choose "Regular Expression" mode from the pop-up menu in the search text field. Enter "var(\d+)Letter" for the search text, and "var\1letter" for the replacement text.

The "\d+" syntax matches any sequence of one or more digits. The "\1" is replaced by the text matched by the first set of parentheses in the search text.

like image 45
Derek Ledbetter Avatar answered Apr 08 '26 14:04

Derek Ledbetter