How do i change the c coding style format in emacs ? Specifically i need to change the indentation in the c code shown by emacs from i per block to 2 per block
Type M-x followed by "customize-mode" followed by "c-mode". Then use the built-in customization page to override the default "C Basic Offset" with your new value of "2". When you're done, be sure to select "Save for future sessions" at the top of the page.
Among the built-in indentation styles, "gnu" has an indentation width of 2 characters. You can choose an indentation style with c-set-style, bound to C-c..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With