开发者

Emacs changing c coding style

开发者 https://www.devze.com 2023-02-20 09:26 出处:网络
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 iper block to 2 per blockType M-x followed by \"cu

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..


Take a look at http://code.google.com/p/google-styleguide/
There is ready to use macro. You can customize it if you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号