Eclipse 空格而不是制表符用于对齐变量名称和值,怎么样?
Eclipse spaces instead of tabs for aligning variable names and values, how?
我喜欢使用制表符进行缩进,因为这样人们可以决定自己的缩进大小。但是,当使用制表符对齐任何内容时,如果使用不同的制表符大小,对齐将完全混乱。
以这段代码为例:
public static final MailCostManager mailCost = new MailCostManager();
public static final GamePricesManager gamePrices = new GamePricesManager();
public static final GameNamesManager gameNames = new GameNamesManager();
public static final GameInfoManager gameInfo = new GameInfoManager();
public static final GameServerManager gameServers = new GameServerManager();
public static final GameServerJoiningManager gameServerJoining = new GameServerJoiningManager();
public static final MatchmakingManager matchmaking = new MatchmakingManager();
public static final GroupManager groups = new GroupManager();
public static final LevelManager levels = new LevelManager();
public static final PaymentWallManager paymentWall = new PaymentWallManager();
public static final HttpAccountActions httpAccountActions = new HttpAccountActions();
缩进("public static ..."之前的制表符)应该是制表符,因为那是缩进。但是,类型和变量名之间,变量名和值之间的 space 应该是 space 。
如何使 Eclipse 使用 spaces 对齐变量名称和值,并使用制表符进行缩进,包括这些变量行的缩进?
Eclipse 甚至可以做到这一点吗?
这是不可能的。 Eclipse 可以使用制表符或空格,但它不支持像这样混合使用它们。
我喜欢使用制表符进行缩进,因为这样人们可以决定自己的缩进大小。但是,当使用制表符对齐任何内容时,如果使用不同的制表符大小,对齐将完全混乱。
以这段代码为例:
public static final MailCostManager mailCost = new MailCostManager();
public static final GamePricesManager gamePrices = new GamePricesManager();
public static final GameNamesManager gameNames = new GameNamesManager();
public static final GameInfoManager gameInfo = new GameInfoManager();
public static final GameServerManager gameServers = new GameServerManager();
public static final GameServerJoiningManager gameServerJoining = new GameServerJoiningManager();
public static final MatchmakingManager matchmaking = new MatchmakingManager();
public static final GroupManager groups = new GroupManager();
public static final LevelManager levels = new LevelManager();
public static final PaymentWallManager paymentWall = new PaymentWallManager();
public static final HttpAccountActions httpAccountActions = new HttpAccountActions();
缩进("public static ..."之前的制表符)应该是制表符,因为那是缩进。但是,类型和变量名之间,变量名和值之间的 space 应该是 space 。
如何使 Eclipse 使用 spaces 对齐变量名称和值,并使用制表符进行缩进,包括这些变量行的缩进?
Eclipse 甚至可以做到这一点吗?
这是不可能的。 Eclipse 可以使用制表符或空格,但它不支持像这样混合使用它们。