Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto-align "=" in assignments

How do one convert a block of variable assignments, e.g.:

private final String s1 = "10011";
private final String s2 = "01100";
private final String ones = "11111";
private final String zeros = "00000";

To a straightened format where all = signs are aligned to one space after the longest left-hand side, e.g.:

private final String s1    = "10011";
private final String s2    = "01100";
private final String ones  = "11111";
private final String zeros = "00000";
like image 943
Adam Matan Avatar asked Dec 18 '12 15:12

Adam Matan


1 Answers

You can use the Eclipse plugin columns4eclipse:

  • gratis
  • open source
  • I've tested it with Eclipse 4.3 x64 and 4.5 x64 on Windows 7 SP1 x64 Ultimate

enter image description here

like image 136
Franck Dernoncourt Avatar answered Oct 16 '22 18:10

Franck Dernoncourt