Gnu Emacs缩进我的typedef

时间:2010-04-09 02:00:08

标签: c emacs indentation

Gnu Emacs坚持按我的方式缩进我的typedef:

typedef enum {
    horizontal,
    vertical,
}
    shapes;

我希望它缩进如下:

typedef enum {
    horizontal,
    vertical,
}
shapes;

我可以使用什么开关来获得它?

1 个答案:

答案 0 :(得分:4)

转到“形状”所在的行,并点击C-c C-o。然后按0(因为这是你想要的偏移量)。然后按Enter键。然后按Tab键缩进。完成。

文档对此过程非常清楚:

http://www.cims.nyu.edu/cgi-comment/info2html?(cc-mode.info)Interactive%2520Customization