RubyMine 2017.3 Help

Postfix Completion

File | Settings | Editor | General | Postfix Completion for Windows and Linux
RubyMine | Preferences | Editor | General | Postfix Completion for macOS
Ctrl+Alt+S settings


Overview

Postfix code completion lets you transform an already typed expression to another one based on the postfix you type after a dot, the type of the expression, and its context. This transformation is performed by expanding the postfix-specific predefined template.

For example, the .if postfix applied to an expression wraps it with an if statement.

BeforeAfter
function m(arg) { arg.if }
function m(arg) { if (arg) { } }

See more at: Postfix Code Completion.

On this page, enable and disable postfix templates and appoint the key to activate the template expansion.

Controls

ItemDescription
Enable postfix completion
  • Select this checkbox to have RubyMine transform expressions with postfixes into other expressions by expanding postfix-specific templates. When the checkbox is selected, choose the postfixes to apply transformations to by selecting the checkboxes next to the desired postfixes in the list below.
  • When this checkbox is cleared, no template expansion is applied.
Expand template with From this drop-down box, choose the key that will invoke template expansion. The available options are: Tab, Space, and Enter.
Table of available postfix templates The table below shows the list of available postfix templates. To enable or disable a template, select or clear the checkbox next to it. When you select a template, the right-hand pane shows its description and illustrates how it works by displaying the expression before and after the selected template is applied.
Last modified: 4 April 2018

See Also