Line breaks between function definitions

后端 未结 2 2009

Is there any way to to automatically insert spaces between function definitions. E.g. my initial sources are:

void
func1()
{
    // func1 body.
}
void
func2(         


        
2条回答
  •  借酒劲吻你
    2020-12-18 18:46

    Your best bet is to set 'MaxEmptyLinesToKeep: 2' inside .clang-format file to let clang-format keep 2 lines intact.

提交回复
热议问题