Emacs - override indentation

后端 未结 6 1221
悲&欢浪女
悲&欢浪女 2020-12-29 23:24

I have a multiply nested namespace:

namespace first {namespace second {namespace third {
              // emacs indents three times
    // I want to intend h         


        
6条回答
  •  鱼传尺愫
    2020-12-30 00:14

    This works for me, inherit from cc-mode and replace the name space indenting to 0, aka, disable it's indent.

    (defconst my-cc-style
      '("cc-mode"
        (c-offsets-alist . ((innamespace . [0])))))
    
    (c-add-style "my-cc-mode" my-cc-style)
    

提交回复
热议问题