VScode 实现末尾加分号;然后自动换行

1.先安装插件 multi-command

2.在文件——首选项——键盘快捷方式——右上角打开键盘快捷方式(JSON)

3.在 kedbindings.json 的[]中输入

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"key": "ctrl+;",
"command": "extension.multiCommand.execute",
"args": {
"sequence": [
{
"command": "cursorEnd"
},
{
"command": "type",
"args": {
"text": ";"
}
},
{
"command": "editor.action.insertLineAfter"
}
]
},
"when": "editorTextFocus"
}

4.在使用的时候按 ctrl+:即可实现