How to reformat the code to save in RubyMine?

Is there a way to automatically reformat my code when I save everything (cmd + s) on a RubyMine Mac?

I tried to associate the CMD + S shortcut with both Save All and Reformat Code, but that did not help.

thank

+4
source share
2 answers

Try recording a macro that includes reformatting your code and assigning it a new key combination.

  • First go to Edit → Macros → Start Macro. A small green box should appear in the lower right corner - the macro recording has begun ...
  • Go to Code -> Reformat Code.
  • Go to File → Save All.
  • Go to the menu Edit → Macros → Stop Macro.
  • (, )
  • RubyMine → Preferences → Keymap (, ) .
  • .
  • cmd + s cntrl + s .
  • "" "".
+5

, , . RubyMine , Commit Changes. , - - , , , .

+1
source

Source: https://habr.com/ru/post/1541321/


All Articles