Basic Code Completion. Completing Names and Keywords
In this section:
Basics
Basic code completion helps you complete the names of classes, methods, and keywords within the visibility scope. When you invoke code completion, AppCode analyses the context and suggests the choices that are reachable from the current position of the caret.
If basic code completion is applied to a part of a parameter, or variable declaration, AppCode suggests a list of possible names with regard to the type of the item.
Code completion covers supported file types and custom file types. However, AppCode does not recognize the structure of custom file types and suggests completion options regardless of whether a specific type is appropriate in the current context.
Completing names
To automatically complete names in the current visibility scope, follow these general steps:
- Type a name or a part of a name.
While typing, use the following techniques:
-
Narrow down the suggestion list by typing
any part of a word, even the characters somewhere in the middle, or invoking code completion
after a dot separator. AppCode will show suggestion list
that includes occurrences with all the possible positions of the entered characters.
This makes the use of the asterisk wildcard unnecessary:
- In case of CamelCase or snake_case names, type the initial letters only. So doing, AppCode automatically recognizes and matches the initial letters.
-
Narrow down the suggestion list by typing
any part of a word, even the characters somewhere in the middle, or invoking code completion
after a dot separator. AppCode will show suggestion list
that includes occurrences with all the possible positions of the entered characters.
- Do one of the following:
- If necessary, press ⌃Space for the second time.
- Select the desired class from the suggestion list, and do one of the following: