daisy
daisy

Reputation: 23501

How can I let Vim align like printf does?

I wanted to let Vim to sort variable declaration like the following:

NotifyNotification*    notification;
gboolean               success;
GError*                error = NULL;

Just like printf does, and I wanted to enable this when use = to align lines, make it the default align method, with au FileType cpp, is that possible?

Upvotes: 0

Views: 298

Answers (1)

mloskot
mloskot

Reputation: 38892

You can try Vim plugins Align and AlignMaps. Check the examples where you can find tables presenting what the plugins do. I think they do what you need.

Upvotes: 5

Related Questions