How do I make Emacs auto-indent my C code?

后端 未结 7 1088
一向
一向 2021-01-31 18:53

I\'m just starting to get a feel for emacs, but I am frustrated with it\'s tendency to not indent when I press the return key. I know if I press C-j it will do it, but I can\'t

7条回答
  •  借酒劲吻你
    2021-01-31 19:35

    If you want to indent the whole c/c++ file, you just do

    1. mark everything: CTRL-x h
    2. press TAB

    That, btw, works also for xml, python code and other types.

提交回复
热议问题