Rubymine - how to format the code In OS X keymap try this one: ⌘+Alt+L Ctrl + Alt + I for Auto-indent line(s) For more keymaps.