1

I would like to produce c code in the following format:

char    *ft_strdup(const char *s1)
{
    char    *h;
    size_t  len;
    ...
}

Where I can tab after the type of the function signature and also tab after type of variable declaration. And those tabs should be real tabs, not space. On my actual Emacs state, when I press tab on those situations, nothing happens.

I have tried to use some snippets I found around on my init.el file, but none of them worked. I also read that, major modes can overwrite some configurations found in the init.el file. Maybe that what was the issue.

So I typed M-x customize-variable RET c-, so I could change some indentation config within the c-major mode but there was a lot of options and I dont know which configs I should change to achieve that format.

I would like to know, which is the recommend way to doing that and how so?

1
  • I wonder if this question is a duplicate...
    – Drew
    Aug 29 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.