Vim Auto Indent with newline

前端 未结 6 1118
礼貌的吻别
礼貌的吻别 2021-02-01 13:18

How do I get vim to place the cursor within the braces starting on a new line, ie with | denoting the cursor position :

class {
  |
}

right now

6条回答
  •  南笙
    南笙 (楼主)
    2021-02-01 14:08

    autoindent refers to it carrying over the current indentation level onto subsequent lines. To get it to indent according to syntax, you need to specify a flag like smartindent or cindent as well.

提交回复
热议问题