![]() ![]() In the top menu you click: Edit > Macros > Stop Macro Recording.In the top menu you click: File > Save All.(you'll see the option being selected in the lower right corner) In the top menu you click: Code > Optimize Imports.Reformat Code (you'll see the option being selected in the lower (you'll see a window lower right corner of your screen confirming In the top menu you click: Edit > Macros > Start Macro Recordings.If you have InteliJ Idea Community 2018.2 and above the steps are as fallows: Use the input field to filter the content, as shown in the screenshot. The Preferences contain the Keymap settings. with: Edit -> Macros -> "Stop Macro Recording"Įverything else remains the same. with: Edit -> Macros -> "Start Macro Recording" You can always reassign it later if you want. If you choose Ctrl+ S like me, it will ask you what to do with the previous Ctrl+ S shortcut. Click "Add Keyboard Shortcut", then perform the keystroke you want.In File -> Settings -> Keymap, select your macro located at "Main Menu -> Tools -> "formatted save".Name the macro (something like "formatted save").Code -> "Optimize Imports.", if a dialogue box appears, check the box that says "Do not show this message again.", then click "Run".Note: You will have to check the box "Do not show this message again" the first time for the organized imports, but it works as expected after that. Assign it a keystroke (I overrode Ctrl+ S).Make a macro (I used Organize Imports, Format Code, Save All). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |