RustRover 2024.1 Help

Live templates

Use live templates to insert common constructs into your code, such as loops, conditions, various declarations, or print statements. You can explore and customize the list of live templates in Settings | Editor | Live Templates | Rust:

Live templates settings

Insert a live template

  • Press Ctrl+J to check which templates are available in the current context. If you already know the abbreviation, just start typing it, choose from the list of suggestions, and press Tab. Keep pressing Tab to jump from one variable in the template to the next one. Press Shift+Tab to move to the previous variable.

Inserting a live template

Surround with

In addition to live templates, RustRover provides standard templates for surrounding code fragments with loop, while, if, for, or other wrappers, depending on the context.

  • Select a code fragment, call Code | Surround With from the main menu or press Ctrl+Alt+T, and choose the surround statement from the list:

    Surround with
Last modified: 26 May 2024