vscode的几项基本配置详解
2020-05-06 14:04:55 来源:易采站长站 作者:于丽
对latex
{
//编译方式
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"%DOC%"
]
},
{
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOCFILE%"
]
}
],
"latex-workshop.latex.recipes": [
{
"name": "xelatex",
"tools": [
"xelatex"
]
},
{
"name": "latexmk",
"tools": [
"latexmk"
]
},
{
"name": "pdflatex -> bibtex -> pdflatex*2",
"tools": [
"pdflatex",
"bibtex",
"pdflatex",
"pdflatex"
]
}
],
//需要清除文件的后缀
"latex-workshop.latex.clean.fileTypes": [
"*.aux",
"*.bbl",
"*.blg",
"*.idx",
"*.ind",
"*.lof",
"*.lot",
"*.out",
"*.toc",
"*.acn",
"*.acr",
"*.alg",
"*.glg",
"*.glo",
"*.gls",
"*.ist",
"*.fls",
"*.log",
"*.fdb_latexmk",
"*.gz"
],
//不要显示错误弹窗
"latex-workshop.message.error.show": false,
//不要显示信息弹窗
"latex-workshop.message.information.show": false,
//不要显示警报弹窗
"latex-workshop.message.warning.show": false,
//保存时不要自动编译
"latex-workshop.latex.autoBuild.run": "never",
//默认在右边tab预览
"latex-workshop.view.pdf.viewer": "tab",
}
tasks.json对C/C++
{
"version": "2.0.0",
"command": "g++",
"args": ["-g","${file}","-o","${fileBasenameNoExtension}.exe"], // 编译命令参数
"problemMatcher": {
"owner": "cpp",
"fileLocation": ["relative", ""],
"pattern": {
"regexp": "^(.*):(d+):(d+):s+(warning|error):s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
}
用asymptote画图后进行编译.asy文件,删除多余文件,将结果移动至特定文件夹
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
//编译
{
//在task列表中显示的文字
"label": "Generate EPS",
//运行环境
"type": "shell",
//命令
"command": "asy",
//参数
"args": [
"-f",
"eps",
//$开头的都是vscode提供的封装好的变量,具体内容
//可以自己尝试
"${file}"
],
//所述属组
"group": "build",
//报错处理
"problemMatcher": []
},
//删除文件
{
"label": "Delete FILE",
"type": "shell",
"command": "del",
"args": [
"*.aux",
"*.log",
"*.dvi",
"*.pdf"
],
//设置为none的task不会在build task的下拉列表中展示
"group": "none",
"problemMatcher": []
},
//将生成的eps移动至相应文件夹
{
"label": "Move EPS",
"type": "shell",
"command": "move",
"args": [
"/Y",
//$开头的都是vscode提供的封装好的变量,具体内容
//可以自己尝试
"${workspaceFolder}${fileBasenameNoExtension}.eps",
"C:Pt_LatexReources"
],
"group": "build",
//在运行这个任务之前,需要提前运行的任务
"dependsOn": [
"Delete FILE"
],
"problemMatcher": []
}
]
}
暂时禁止评论













闽公网安备 35020302000061号