Remove extra leading spaces in single-line comments in Eclipse
问题 My projects in Eclipse using spaces to format code, not tabs . When commenting lines with single-line comment (pressing Ctrl + / ), leading spaces just shifts to right, breaking adjustment with other non-commented lines, for example: class Sample { public int x; // public int y; } What I want is: class Sample { public int x; // public int y; } Manually removing spaces is tedious. Is there any solution for this? (plugin, some kind of macro, any other?) I don't want to use tab-formatting. 回答1: