in my school we use a coding convention, which specifies to separate the name of the variable and its type (in C). In emacs, it would look like this :
static int calc_dir(t_exe *exe, const int id)
{
int x0, y0;
int x1, y1;
}
Another convention is to use tabulations when possible, so here there are tabs between var/functions types and names.
I actually want to switch from emacs to atom editor. I tried to play with a lot of options in uncrustify, to format my code, but I still can't find a way to do this : indent var names with the function name... All I got was to be able to specify an "absolute" number of columns between types and names, with the align_var_def_gap
option, but its absolute, and does not fit if the function name (here "calc_dir")is, let's say 1 tabulation after...
static int calc_dir(t_exe *exe, const int id)
{
int x0, y0;
int x1, y1;
}
It would be great if anyone had a config, or an idea !