Move on Aptos IntelliJ Plugin Help

Code Formatter

Intellij-Move provides automatic code formatter to help making sure your code looks the same across the whole project.

Formatting code from the IDE

You can invoke the formatter both for the whole Move file, and only for the code selection.

Reformat the selection

  1. Select the code fragment you want to reformat.

  2. Press Ctrl+Alt+L or select Code | Reformat Code from the main menu.

Reformat a file

  1. Open the file you'd like to reformat.

  2. Press Ctrl+Alt+Shift+L or select Code | Reformat File... from the main menu.

  3. In the Reformat File dialog, select additional options if necessary. Click Run.

    reformat file

Reformat all files in the specific directory, or for the whole project

  1. Open Project tool window (press Alt+1 or select View | Tool Windows | Project if it's not already visible).

  2. Select the project root, or any other directory.

  3. Press Ctrl+Alt+L or select Reformat Code from the context menu.

  4. In the Reformat Code dialog, select additional options if necessary. Click Run.

    Reformat Directory Code
Last modified: 03 December 2024