VSCode 自定义代码片段
- File -> Preferences -> User Snippets
2.在弹出的窗口中,选择要自定义代码片段的语言(此外选C++)
3.根据示例,定义自己的代码片段
自定义代码片段(一)
"Print to console": {
"prefix": "dx",
"body": [
"#include <iostream>$2",
"using namespace std;",
"$3",
"int main()",
"{",
" $1",
"",
" return 0;",
"}"
],
"description": "c++"
}