-
打开vscode配置文件. 目录C:\Users[你的用户名]\AppData\Roaming\Code\User image.png
-
修改文件keybindings.json监听快捷键ctrl+shift+enter, 触发插件macros的自定义命令macros.end_semicolon
{
"key": "ctrl+shift+enter",
"command": "macros.end_semicolon",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+enter",
"command": "macros.end_semicolon",
"when": "editorTextFocus && !editorReadonly && !suggestWidgetVisible"
}
- 修改settings.json配置插件macros的自定义命令macros.end_semicolon
// 末尾加分号
"macros": {
"end_semicolon": [
"editor.action.formatDocument",
"cursorLineEnd",
{
"command": "type",
"args": {
"text": ";"
}
},
],
}
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/180319.html