Vim Auto Indent with newline

前端 未结 6 1115
礼貌的吻别
礼貌的吻别 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:04

    I found that delimitMate does exactly what you describe and more (that is, automatically inserting the ending }). Note you have to tell delimitMate to expand carriage returns by adding let delimitMate_expand_cr=1 to your config.

    From my observation, this is exactly the behaviour found in TextMate and SublimeText.

提交回复
热议问题