

You can disable certain postfix completion templates in the Editor | General | Postfix Completion page of the IDE settings Ctrl+Alt+S. Type an expression and then type a postfix after a dot, for example. Select Tab, Space, or Enter to be used for expanding postfix templates.Įnable/disable a particular postfix template for the selected language. Go to Settings / Preferences | Editor | General | Postfix Completion and select the Enable postfix completion checkbox.

You can transform an already-typed expression to a different one based on a postfix you type after the dot, the type of expression, and its context. Postfix code completion helps you reduce backward caret jumps as you write code. The first suggested value appears, and the prototype is highlighted in the source code.Īccept the suggestion, or hold the Alt key and keep pressing / until the desired word is found. Press Alt+Shift+/ or choose Code | Code Completion | Cyclic Expand Word (Backward) to search for matching words after the caret and in other open files. Press Alt+/ or choose Code | Code Completion | Cyclic Expand Word to search for matching words before the caret. Type the initial string and do one of the following: Expand a string at caret to an existing word It helps you complete any word from any of the currently opened files. Hippie completion is a completion engine that analyses your text in the visible scope and generates suggestions from the current context. Note that because of the language ambiguity regarding syntax of some incomplete collection literals, a colon is inserted neither after the first key of a dict literal nor after the first item of a parenthesized tuple. Press Ctrl+Shift+Enter to invode statement completion: In dict literals, it inserts a colon between a key and a value. P圜harm automatically inserts a trailing comma before a line break in multiline collection literals. It inserts the necessary syntax elements and gets you in a position where you can start typing the next statement. You can create syntactically correct code constructs by using statement completion Ctrl+Shift+Enter. Alternatively, select Code | Code Completion | Type-Matching from the main menu.

To invoke type-matching completion, start typing your code and press Ctrl+Shift+Space. Smart type-matching code completion filters the suggestions list and shows only the types applicable to the current context. This shows the names of classes, functions, modules, and variables. If necessary, press Ctrl+Space for the second time (or press Ctrl+Alt+Space). The images below show basic code completion for the following cases:įile paths completion in Python string literals: Press Ctrl+Space or choose Code | Code Completion | Basic from the main menu.

Invoking Basic code completion for the second time shows the names of classes, functions, modules, and variables in the entire project, regardless of dependencies. If basic code completion is applied to a part of a field, parameter, or variable declaration, P圜harm suggests a list of possible names depending on the item type. However, P圜harm does not recognize the structure of such files, and suggests options regardless of whether they are appropriate in the current context.īasic completion is also available for a non-English keyboard layout. When you invoke code completion, P圜harm analyses the context and suggests the choices that are reachable from the current caret position (suggestions also include Live templates).Ĭode completion is available for custom file types. Basic completionīasic code completion helps you complete the names of classes, methods, and keywords within the visibility scope. This section covers various techniques of context-aware code completion that allow you to speed up your coding process.
