Vim 使用技巧
CTRL+SHIFT + C/V复制粘贴
快捷键用不了->保存新文件
插入函数用不了->插入几个空行
CTRL+B CTRL+F上下翻页刷新
VSCODE 配置文件
// 将键绑定放在此文件中以覆盖默认值
[
{
"key": "f9",
"command": "workbench.action.tasks.runTask",
"args": "Com",
"when": "editorTextFocus"
},
{
"key": "f11",
"command": "workbench.action.tasks.runTask",
"args" : "ComRunf",
"when": "editorTextFocus"
},
{
"key": "f10",
"command": "workbench.action.tasks.runTask",
"args" :"Runf",
"when": "editorTextFocus"
},{
"key": "f12",
"command": "workbench.action.tasks.runTask",
"when": "editorTextFocus"
},
]
tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"inputs":[
{
"id": "Runtag",
"type": "promptString",
"description": "Run info",
"default": "<1.in >1.out",
},
{
"id": "Comtag",
"type": "promptString",
"description": "Compile info",
"default": "",
}
],
"tasks": [
{
"label": "Com",
"type": "shell",
"command": "g++ ${file} -o ${fileBasenameNoExtension} ",
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"./"
],
"pattern": {
"regexp": "^(.*):([0-9]+):([0-9]+): (.*): (.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": false
},
"group": "build"
},
{
"label": "ComC",
"type": "shell",
"command": "g++ ${file} -o ${fileBasenameNoExtension} ${input:Comtag}",
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"./"
],
"pattern": {
"regexp": "^(.*):([0-9]+):([0-9]+): (.*): (.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": false
},
"group": "build"
},
{
"label": "ComRunf",
"type": "shell",
"command": "g++ ${file} -o ${fileBasenameNoExtension} && ./${fileBasenameNoExtension} ${input:Runtag}",
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"./"
],
"pattern": {
"regexp": "^(.*):([0-9]+):([0-9]+): (.*): (.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": false
},
"group": "build"
},
{
"label": "Runf",
"type": "shell",
"command": "./${fileBasenameNoExtension} ${input:Runtag}",
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"./"
],
"pattern": {
"regexp": "^(.*):([0-9]+):([0-9]+): (.*): (.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": false
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
{
"workbench.colorTheme": "Quiet Light",
"editor.cursorSmoothCaretAnimation": true,
"editor.tabCompletion": "on",
"editor.insertSpaces": false,
"editor.detectIndentation": false,
"terminal.integrated.defaultLocation": "editor",
"window.zoomLevel": 1
}