VS code install and settings.

2021-11-12 VSCode

1. Extensions:

  • LaTeX Workshop
  • Markdown Preview Enhanced

2. setting.json

{
    "workbench.colorTheme": "Monokai",
    "editor.fontSize": 16,
    // LaTeX
    // onFileChange, onSave, never
    "latex-workshop.latex.autoBuild.run": "never",
    "latex-workshop.message.error.show": false,
    "latex-workshop.message.warning.show": 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": "bibtex",
            "command": "bibtex",
            "args": [
                "%DOCFILE%"
            ]
        }
    ],

    "latex-workshop.latex.recipes": [
        {
            "name": "pdflatex",
            "tools": [
                "pdflatex"
            ]
        },
        {
            "name": "pdf->bib->pdf->pdf",
            "tools": [
                "pdflatex",
                "bibtex",
                "pdflatex",
                "pdflatex"
            ]
        },
        {
            "name": "xe->bib->xe->xe",
            "tools": [
                "xelatex",
                "bibtex",
                "xelatex",
                "xelatex"
            ]
        },
        {
            "name": "xelatex",
            "tools": [
                "xelatex"
            ],
        }
    ],
    "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",  
        "*.nav",  
        "*.snm",  
        //"*.synctex.gz"  
      ], 

    //"latex-workshop.view.pdf.viewer":"tab",
    "latex-workshop.view.pdf.viewer": "external",
    "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
    "latex-workshop.view.pdf.external.viewer.command": "E:/VSCode/SumatraPDF/SumatraPDF.exe",
    "latex-workshop.view.pdf.external.viewer.args": [
        "%PDF%"
    ],
    "latex-workshop.view.pdf.external.synctex.command": "E:/VSCode/SumatraPDF/SumatraPDF.exe",
    "latex-workshop.view.pdf.external.synctex.args": [
        "-forward-search",
        "%TEX%",
        "%LINE%",
        "-reuse-instance",
        "-inverse-search",
        "\"E:/VSCode/MicrosoftVSCode/Code.exe\" \"E:/VSCode/MicrosoftVSCode/resources/app/out/cli.js\" -r -g \"%f:%l\"",
        "%PDF%",
    ],
    "editor.wordWrap": "on",
    "editor.rulers": [
        80
    ],
    "C_Cpp.updateChannel": "Insiders",
    //"r.rterm.windows": "E:/R/R3.6.3/R-3.6.3/bin/x64/R.exe",
    //"r.lsp.lang": "E:/R/R3.6.3/R-3.6.3/bin/x64/R.exe",
    //"editor.fontLigatures": null,
    //"r.alwaysUseActiveTerminal": true,
    //"r.bracketedPaste": true,
}