|
|
|
|
|
by LeonM
2243 days ago
|
|
Ctrl-alt-L (cmd-alt-L) is my all-time favorite. It reformats the code consistently. It's the first thing I do when I start work on a new codebase, and the last thing I do before a commit. No need for endless discussions on which style is best, as the IDE allows you to set the preferences on a per-project basis. It can also read editor config dotfiles so you can use code formatting consistently throughout a team. |
|
And yes, there is no such thing as best style, so at the end of the day it boils down to personal preference. I find myself using the ctrl+alt+l often but before i commit any code i carefully go over everything and change it to my particular liking(which is often close enough to what the IDE has done so I rarely spend more than a minute or two on it). Also the reason why I haven't bothered to dig deep into the preferences.