Code completion/snippets/templates

In Xcode when I type if I am offered if and if-else code snippets which include all the brackets and placeholders for the condition and branch body code.  The cursor also jumps straight to the condition and after entering the code tab takes me to body of the condition.  I'm trying to do the same thing in AppCode.

Also in Xcode I can press escape to invoke the code completion list and the same key closes it.  How do I get AppCode to do the same thing?

1 comment
Comment actions Permalink

Ian,

there is a Live Template feature in AppCode, there are several built-in templates, you also can create your own.
To use them, sumply type their name and press tab and see what happens.
e.g.

NSArray *array = ...;
each<tab>

There is also a 'Surrown With' feature  select any expression or a block and press Option-Command-T.
There are some other convenient ways to generate various code fragments, like Command-N ('Generate'), Control-O/I (Override or Implement a method) etc.

As for the 'escape', no AppCode doesn't use it to show the completion results.

0

Please sign in to leave a comment.