Luc*_*ini 5 c++ emacs templates
有人知道如何禁止emacs在模板子句后缩进函数或类的名称吗?
目前的结果是:
template <typename T>
class A {
/* ... */
};
Run Code Online (Sandbox Code Playgroud)
我想要的地方:
template <typename T>
class A {
/* ... */
};
Run Code Online (Sandbox Code Playgroud)
非常感谢您的帮助.
编辑1 我正在使用c ++ - 模式,java作为c ++的缩进样式.我用这种方式定制了c-offset-alist:
(custom-set-variables
;;
'(c-offsets-alist (quote ((case-label . +) (innamespace . 0))))
Run Code Online (Sandbox Code Playgroud)
转到该class
行并点击TAB
以执行(未经请求的)缩进.
然后按Control-CControl-Oto display the indent mode for
topmost-intro-cont`
按ENTER
,然后您可以更改缩进数字(例如3到0).
在您的最后,您.emacs
可以永久设置该指令:
(c-set-offset 'topmost-intro-cont 0 nil)
Run Code Online (Sandbox Code Playgroud)