让 vscode 和 idea 一样注释后自动换行
安装IDEA KeyBinding插件后发现无法和IDEA一般注释后换行,经过一番查询,如下解决:
https://github.com/kasecato/vscode-intellij-idea-keybindings/issues/233#issuecomment-1491495313
Ctrl+Shift+A
搜索 Open Keyboard Shutcuts (JSON)
,将以下代码加到末尾,注意JSON语法。
{
"key": "ctrl+/",
"command": "runCommands",
"args": {
"commands": [
"editor.action.commentLine",
"cursorDown"
]
},
"when": "editorTextFocus && !editorReadonly"
},