Gerald Lai wrote:nip]
> I am unfamiliar with AlignMaps,
What! You should!!! :)
> but what you describe sounds like it
> could be done with simple substitutions.
> Original: pointer stars before the variable name
> :%s/\w\zs\s\*\ze\h/* /g
> (the above is the basic idea, below is a more general form)
> Original: one space before and after the equal sign
> :%s/\w\zs\s=\s\ze\h/ = /g
> (the above is the basic idea, below is a more general form, allowing for
> any amount of space before and after the equal sign, enforcing the
> :%s/\w\zs\s*=\s*\ze\h/ = /g
The problem here is not all "="s are equal! In other words, probably
the "="s inside comments should not be affected. Furthermore, it
doesn't avoid single-line comments (which could be done with a "v/.../"
as done in my own reply). Similar comments apply to the "*' handling
(besides, there may be more than one; ie; int **x; ).