vim - indentation of C++ constructor initialization list problem

南笙酒味 提交于 2019-12-05 13:03:49

According to documentation and a little experiment, the following could help:

:set cino=i-s

Seems to be indenting init list exactly as you wanted.

Try this. Basically I had a quick play with the cino options. Not sure if it will affect any of your other formatting preferences but looks ok to me.

:set cino=i0,n0,+0

Looks like this is a genuine bug in vim since cino=i1 does the right thing, but cino=i0 doesn't. :help bugs for information on what to do from here.

have you tried "set smartindent"? i think it does what you want.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!