{
"workbench.colorTheme": "GitHub Dark",
"fittencode.languagePreference.displayPreference": "zh-cn",
"fittencode.languagePreference.commentPreference": "zh-cn",
"files.autoSave": "afterDelay", //vscode自動(dòng)保存
"markdown.copyFiles.destination": {
"**/*.md": "${documentBaseName}.assets/${fileName}"
},
"latex-workshop.latex.autoBuild.run": "onSave", //什么時(shí)候自動(dòng)編譯洞坑,三個(gè)選項(xiàng):onFileChange,onSave,never (當(dāng)檢測(cè)到代碼更改時(shí)自動(dòng)編譯混萝,文件保存時(shí)自動(dòng)編譯,不自動(dòng)編譯)
"latex-workshop.showContextMenu": true, //啟用latex菜單
"latex-workshop.intellisense.package.enabled": true, //設(shè)置為true桐猬,則該拓展能夠從使用的宏包中自動(dòng)提取命令和環(huán)境,從而補(bǔ)全正在編寫的代碼
"latex-workshop.message.error.show": false,
"latex-workshop.message.warning.show": false, //這兩個(gè)命令是設(shè)置當(dāng)文檔編譯錯(cuò)誤時(shí)是否彈出顯示出錯(cuò)和警告的彈窗。因?yàn)檫@些錯(cuò)誤和警告信息能夠從終端中獲取近速,且彈窗彈出比較煩人,故而筆者設(shè)置均設(shè)置為false堪旧。
"latex-workshop.latex.tools": [
{
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"-outdir=%OUTDIR%",
"%DOCFILE%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOCFILE%"
]
}
],
"latex-workshop.latex.recipes": [
{
"name": "XeLaTeX",
"tools": [
"xelatex"
]
},
{
"name": "PDFLaTeX",
"tools": [
"pdflatex"
]
},
{
"name": "BibTeX",
"tools": [
"bibtex"
]
},
{
"name": "LaTeXmk",
"tools": [
"latexmk"
]
},
{
"name": "xelatex -> bibtex -> xelatex*2",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
},
{
"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"
],
"latex-workshop.latex.autoClean.run": "onFailed",
"latex-workshop.latex.recipe.default": "lastUsed",
"latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
補(bǔ)充
{
"editor.minimap.enabled": false,
"files.autoSave": "afterDelay",
"cmake.configureOnOpen": true,
"cmake.pinnedCommands": [
"workbench.action.tasks.configureTaskRunner",
"workbench.action.tasks.runTask"
],
"cmake.showOptionsMovedNotification": false,
"git.suggestSmartCommit": false,
"explorer.confirmDelete": false,
"fittencode.languagePreference.displayPreference": "zh-cn",
"fittencode.languagePreference.commentPreference": "zh-cn",
"window.zoomLevel": -1
}
解析
這個(gè) settings.json
配置文件是 Visual Studio Code 的用戶設(shè)置削葱,用于配置一些編輯器行為和工具的偏好。以下是每個(gè)設(shè)置項(xiàng)的解釋:
"editor.minimap.enabled": false
禁用代碼編輯器的 minimap(代碼預(yù)覽)淳梦,即側(cè)邊欄顯示的縮略圖析砸,不再顯示代碼的整體視圖。"files.autoSave": "afterDelay"
配置自動(dòng)保存功能爆袍,當(dāng)文件修改后干厚,延遲一段時(shí)間自動(dòng)保存文件。具體的延遲時(shí)間可以通過files.autoSaveDelay
設(shè)置調(diào)整螃宙。"cmake.configureOnOpen": true
當(dāng)你打開一個(gè) CMake 項(xiàng)目時(shí)蛮瞄,VS Code 會(huì)自動(dòng)運(yùn)行 CMake 配置,以確保項(xiàng)目的構(gòu)建設(shè)置是最新的谆扎。"cmake.pinnedCommands": [ "workbench.action.tasks.configureTaskRunner", "workbench.action.tasks.runTask" ]
配置 CMake 相關(guān)任務(wù)命令挂捅,這里將兩個(gè)任務(wù)命令configureTaskRunner
和runTask
固定到任務(wù)欄。目的是在運(yùn)行 CMake 構(gòu)建時(shí)堂湖,能夠更快捷地進(jìn)行任務(wù)配置和執(zhí)行闲先。"cmake.showOptionsMovedNotification": false
禁用 CMake 選項(xiàng)移動(dòng)時(shí)的通知提示。如果 CMake 在更新時(shí)有選項(xiàng)位置的變化无蜂,不再彈出通知伺糠。"git.suggestSmartCommit": false
禁用 Git 提交時(shí)的智能建議。VS Code 會(huì)停止為 Git 提交自動(dòng)提供建議(如建議提交消息的模板)斥季。"explorer.confirmDelete": false
禁用刪除文件時(shí)的確認(rèn)提示训桶。在文件資源管理器中刪除文件時(shí)累驮,系統(tǒng)不會(huì)再要求確認(rèn)。"fittencode.languagePreference.displayPreference": "zh-cn"
設(shè)置 FitCode 插件的顯示語言為簡(jiǎn)體中文舵揭。這是與代碼片段或提示相關(guān)的語言設(shè)置谤专。"fittencode.languagePreference.commentPreference": "zh-cn"
設(shè)置 FitCode 插件中注釋部分的語言偏好為簡(jiǎn)體中文。它可能影響代碼生成時(shí)注釋的語言午绳。"window.zoomLevel": -1
設(shè)置窗口的縮放級(jí)別為 -1置侍,即使得界面縮小了一些(默認(rèn)是 0,表示正常大欣狗佟)笼才。通過這個(gè)設(shè)置可以調(diào)整 VS Code 界面的顯示比例葛闷。
總的來說惠勒,這個(gè)配置文件優(yōu)化了 CMake 構(gòu)建體驗(yàn)尽爆,調(diào)整了 Git 提交和文件刪除的行為,禁用了不必要的界面元素螟够,同時(shí)通過語言設(shè)置讓某些插件適配簡(jiǎn)體中文灾梦。