Aligning function arguments to match a specific coding style
Most projects have specific coding style guidelines. In this case, the argument list must be broken into a new line for each argument, with the argument names right aligned, taking into account pointers.
Start file
void
clutter_layout_manager_get_preferred_width (ClutterActor *actor,
ClutterContainer *container,
gfloat for_width,
gfloat *min_width_p,
gfloat *natural_width_p)
{
}
End file
void
clutter_layout_manager_get_preferred_width (ClutterActor *actor,
ClutterContainer *container,
gfloat for_width,
gfloat *min_width_p,
gfloat *natural_width_p)
{
}
View Diff
2c2
< clutter_layout_manager_get_preferred_width (ClutterActor *actor,
---
> clutter_layout_manager_get_preferred_width (ClutterActor *actor,
4,6c4,6
< gfloat for_width,
< gfloat *min_width_p,
< gfloat *natural_width_p)
---
> gfloat for_width,
> gfloat *min_width_p,
> gfloat *natural_width_p)
Solutions
The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!
Check out these helpful resources to improve your Vim skills... Game on.
Unlock 70 remaining solutions by signing in and submitting your own entry
#71 Justin Knag / @justinknag - Score: 89 - 09/13/14 @ 15:39
j$bhi <Esc>jjbblllllli jj<BS><BS><Esc>jbbi j<BS><Esc>jjkkui <Esc>jbbi <Esc>ZZ
0 comments