8

I am used to Visual Studio's Ctrl+K, Ctrl+D shortcut to quickly tidy up my C# code, does an equivalent exist in Intellij IDEA for Java?

Brad Christie
  • 100,477
  • 16
  • 156
  • 200
JMK
  • 27,273
  • 52
  • 163
  • 280

3 Answers3

18

The format code shortcut in IntelliJ IDEA is CtrlAltL.

Here's a list of keyboard shortcuts in IntelliJ IDEA and Eclipse.

Also note that you can configure shortcuts yourself.

Brian
  • 17,079
  • 6
  • 43
  • 66
2

You can find all the keyboard shortcuts in [Help Menu] -> [Default Keymap Reference]. It is an excellent PDF that you can print and keep next to your keyboard.

maba
  • 47,113
  • 10
  • 108
  • 118
1

Yes, hit CTRL+ALT+L and follow the options.

Mwiza
  • 7,780
  • 3
  • 46
  • 42
Vitaliy
  • 8,044
  • 7
  • 38
  • 66