IntelliJ Shortcuts and Configurations

In this space, all of the intelliJ shortcuts and configurations that we find more practical then others are listed

Shortcuts

1. CTRL+J – Opens up Live Templates. Used for Spock individual test creation in quick way

Source:http://tv.jetbrains.net/videocontent/ffff

2. Optimize Import Statements. It removes unused imports and sorts in alphabetical order. To use:

Command + Alt + O

Configurations

1. Enable line numbers show at all times. (Settings->Editor->Appearance->Show Line Numbers)

From ‘How Can i Permanently Have Line Numbers in IntellJ’ 

2. Code Formatting For Labels
To see labels(when,then,setup,etc) formated on left (good for GEB Tests):
File->Other Settings->Template Settings…->Code Style->Groovy-> Set “label indent” to 2 and checking the “Absolute label indent” checkbox.

Leave a Reply

Your email address will not be published. Required fields are marked *