Vim: How to indent to an open paren or bracket when hitting enter?

后端 未结 3 928
终归单人心
终归单人心 2020-12-31 09:29

I\'ve been programming Python with Vim for a while but one thing I haven\'t been able to figure out how to do it set it to auto indent to the level of the last open paren.

3条回答
  •  旧巷少年郎
    2020-12-31 10:08

    Use gq, either over the whole selection with a VISUAL block, or with a movement, like gqq or gqj

提交回复
热议问题