RubyMine 2025.2 Help

Advanced completion

Statement completion

You can create syntactically correct code constructs by using statement completion. It inserts the necessary syntax elements (parentheses, braces, and semicolons) and gets you in a position where you can start typing the next statement.

To invoke statement completion, start typing a code construct and press Ctrl+Shift+Enter.

Complete a method or function declaration

  • Start typing a method or function declaration and press Ctrl+Shift+Enter after the parenthesis. RubyMine adds end for methods, classes, modules, conditionals (if, unless, case), and blocks (do … end).

    def paint # caret
    def paint # caret end

Complete a code construct

  • Start typing a code construct and press Ctrl+Shift+Enter.

    RubyMine automatically completes the construct and adds end. The caret is placed at the next editing position.

    if art.nil? # caret
    if art.nil? # caret end

Hippie completion

Hippie completion is a completion engine that analyses your text in the visible scope and generates suggestions from the current context. It helps you complete any word from any of the currently opened files.

Expand a string at caret to an existing word

  1. Type the initial string and do one of the following:

    • Press Alt+/ or choose Code | Code Completion | Cyclic Expand Word to search for matching words before the caret.

    • 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.

    The first suggested value appears, and the prototype is highlighted in the source code.

    Expand word
  2. Accept the suggestion or hold the Alt key and keep pressing \ until you find the word you need.

Completion of tags and attributes

RubyMine automatically completes names and values of tags and attributes in many file types:

Complete tag names

  1. Type the opening < and then start typing the tag name. RubyMine displays the list of tag names appropriate in the current context.

    Use the Up and Down keys to scroll through the list.

  2. Press Enter to accept a selection from the list. If your file is associated with a schema or a DTD, RubyMine automatically inserts the mandatory attributes according to it.

Import a taglib declaration

If you need to use tags declared in a tag library, you need to import this taglib before any custom tag from it can be used.

  1. Start typing a taglib prefix and press Alt+Insert.

  2. Select a taglib from the list and press Enter.

    RubyMine imports the selected taglib and adds the import statement automatically.

Insert a tag declared in a taglib

  1. Start typing a tag and press Ctrl+Alt+Space.

  2. Select a tag from the list. The uri of the taglib it belongs to is displayed in brackets.

  3. Select a taglib and press Enter. RubyMine adds the declaration of the selected taglib.

23 September 2025