Vim smart insert semicolon

前端 未结 7 906
遇见更好的自我
遇见更好的自我 2021-02-04 00:49

Is there a Vim plugin that can handle smart semicolon insertion, like the one in Eclipse?

Example (pipe character is insertion cursor):

foobar(|)
         


        
7条回答
  •  甜味超标
    2021-02-04 01:27

    I use this mapping:

    inoremap ; A;
    

    It's not ; because I use semicolons often and in more than one context.

    • is used to input a single normal mode command.
    • A; means "add a ; at the end of the line".

提交回复
热议问题