One of my favorite plugins that I constantly suggest to install is Save Actions
Save Actions plugin allows me to run a few code quality actions whenever a file is saved: pretty straightforward.
The configuration is accessible from Preferences -> Other Settings -> Save Actions and the default looks pretty much like this:
This is it, really. This little trick allows you to stop thinking about unused imports or messy code formatting. Things will just fall in place when I save.
You can even try fancier stuff, tho. Save Actions is also able to run a Quick List. A Quick List can look like this:
This Quick List runs three actions:
- Fix the imports
- Fix the code style
- Sort the XML alphabetically
Once you created the Quick List, you can wire it to Save Actions like this:
This is such a powerful tool to automate your most common IDE tasks and I hope it can take away a bit of stress off your daily programming work 😃
Happy coding 💪🏻
One thought on “IntelliJ IDEA / Android Studio Tricks: “Save Actions” plugin”
Can it also auto-add “final” on Java?
I had it on Eclipse years ago, and it was great.
Comments are closed.