views:

33

answers:

1

The Align plugin is all nice and dandy, but I encounter problems with it when dealing with generics generics such that:

HashMap<String, Object> session = new HashMap();
ArrayList<String> names = new ArrayList();
String banana = "Yo banana boy";
int count = 0;

After \adec it becomes:

HashMap<String, Object> session = new HashMap();
ArrayList<String> names                         = new ArrayList();
String banana                                   = "Yo banana boy";
int count                                       = 0;

But I was actually expecting:

HashMap<String, Object> session = new HashMap();
ArrayList<String>       names   = new ArrayList();
String                  banana  = "Yo banana boy";
int                     count   = 0;

or even better:

HashMap   <String, Object> session = new HashMap();
ArrayList <String>         names   = new ArrayList();
String                     banana  = "Yo banana boy";
int                        count   = 0;

How do I make Align.vim behave as described?

A: 

Looks like this is a bug in Align.vim. The closest I could get was:

:Align < =
:Align =

However, to be fair, the Align.vim page on vim.org says it is for aligning C declarations. http://www.vim.org/scripts/script.php?script_id=294

sleepynate