Re: Newbie questions about XCode
Re: Newbie questions about XCode
- Subject: Re: Newbie questions about XCode
- From: Jean-Daniel Dupas <email@hidden>
- Date: Wed, 3 Feb 2010 12:27:28 +0100
Le 3 févr. 2010 à 12:18, Roland King a écrit :
>
> On 03-Feb-2010, at 6:33 PM, Johan Lund wrote:
>
>>
>> Why does not camelcase completion work? e.g. typeing “UIPV” should cause UIPickerView to be suggested.
>
> as far as I know because it doesn't, I've never even thought about that feature before, I type uip and then <esc> and go pick from the list, by the time you typed uipi you're pretty much there. Perhaps you're used to thinking in camelCase, I never really have.
>
>>
>> Why does the editor not insert a closing brace automatically? I type a new method in my .m file and press enter after typing in the opening brace and it should automatically add the closing brace but it doesn’t.
>
> There's a preference for that, I have it turned off because it annoyed me and I can't remember why, look in the indentation options. There's also an option to supply an opening bracket if you close one you didn't open, but I just turned that one off too because XCode and I disagree about spacing in brackets.
>
>>
>> Why does the completion not know about variables declared in the .h file?
>> Oh, it does, just found out... But only if you have saved your .h file, which brings me to my next question.
>>
>> This, having to save all the time is highly annoying. Especially when you add an outlet and switch into interface builder and its not there. Is there a way to automatically save the document everytime I switch between counterparts or into xcode or before compiling etc. In IntelliJ IDEA there is no need to save - ever! If you need to go back on something dangerous you just pull up local history, and in addition to that you have VCN.
>
> the only autosave option I know of, and I have it turned on, is in the building tab where you can get it to save files when you build. I've become used to hitting Cmd-S as I leave a file, especially a header file, knowing that will fix autocomplete, but yes that is sometimes a little annoying.
>
>>
>> Why do I sometimes get two tabs instead of one? I find that I quite often have to press backspace on a new line because XCode inserted two tabs instead of one.
>>
>> Is there a way to add a newline after the one I am currently positioned in the middle of? Right now I am moving the the end of the line first then pressing enter but in e.g. IntelliJ IDEA I can just press shift enter.
>
> I don't know why you get two tabs, I don't think I do and I don't know how to add a newline after the line you're in, but I don't recall ever wanting to do so.
>
>>
>> Is there a way to auto indent a block of code that has become a bit messy?
>
> well there's a re-indent feature, but I'd like more myself. I'd like to be able to set up my own rules for brackets and braces and spaces and be able to reindent and reformat a block of code with those features in. That's particularly so because where XCode templates out
>
> if ([[object foo] bar] ){
> action
> }
>
> which separates the opening ( from the if, squashes [ up against the object and puts the opening brace on the same line, I change it to
>
> if( [ [ object foo ] bar ] )
> {
> action
> }
>
> and that gets old really fast when you start as many new projects as I do. yes I could edit the templates but I did that once and then a new version of XCode came out with new templates and I didn't feel like doing it all over again.
And an other option would be to change default formatting settings.
See XCCodeSenseFormattingOptions in Xcode User Default Reference.
http://developer.apple.com/mac/library/documentation/DeveloperTools/Reference/XcodeUserDefaultRef/100-Xcode_User_Defaults/UserDefaultRef.html#//apple_ref/doc/uid/TP40005535-CH3-SW40
-- Jean-Daniel
_______________________________________________
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