开发者

How do I make Align.vim \adec work correctly when java generics are involved?

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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜