当我通过 tex workshop 在 vscode 中编译 tex 时,我的编辑器失去了焦点?

当我通过 tex workshop 在 vscode 中编译 tex 时,我的编辑器失去了焦点?

我上周重新安装了 MacOS。我可以保存我的 tex 代码,然后 vscode 将在右侧的 vscode 选项卡中显示 tex 的 PDF,我可以直接更改代码而无需修改光标位置。重新安装 MacOS 并设置相同的配置后,偶尔我保存 tex 代码时,它会失去编辑器的焦点并聚焦在 PDF 上。这让我很困扰。这是我的 vscode settings.json 文件文本:

{
    "workbench.colorTheme": "Default Light+",
    "editor.fontLigatures": null,

    "vim.insertModeKeyBindings": [
        {
          "before": ["j", "j"],
          "after": ["<Esc>"]
        }
    ],
    "editor.fontSize": 18,
    "editor.fontFamily": "Consolas, 'Courier New', monospace",
    "code-runner.clearPreviousOutput": true,
    "security.workspace.trust.untrustedFiles": "open",
    "code-runner.runInTerminal": true,
    "code-runner.saveFileBeforeRun": true,
    "code-runner.saveAllFilesBeforeRun": true,
    "python.pythonPath": "/Users/chant/opt/anaconda3/bin/python",
    "python.defaultInterpreterPath": "/Users/chant/opt/anaconda3/bin/python",
    "terminal.integrated.inheritEnv": false,

    "latex-workshop.latex.tools": [
      {
        "name": "xelatex",
        "command": "xelatex",
        "args": [
          "-synctex=1",
          "-interaction=nonstopmode",
          "-file-line-error",
          "-pdf",
          "%DOC%"
        ]
      },
      {
        "name": "pdflatex",
        "command": "pdflatex",
        "args": [
          "-synctex=1",
          "-interaction=nonstopmode",
          "-file-line-error",
          "%DOC%"
        ]
      },
      {
        "name": "latexmk",
        "command": "latexmk",
        "args": [
          "-synctex=1",
          "-interaction=nonstopmode",
          "-file-line-error",
          "-pdf",
          "%DOC%"
        ]
      },
      {
        "name": "bibtex",
        "command": "bibtex",
        "args": [
          "%DOCFILE%"
        ]
      }
    ],

    "latex-workshop.latex.recipes": [
      {
        "name": "XeLaTeX",
        "tools": [
          "xelatex"
        ]
      },
      {
        "name": "PDFLaTeX",
        "tools": [
          "pdflatex"
        ]
      },
      {
        "name": "latexmk",
        "tools": [
          "latexmk"
        ]
      },
      {
        "name": "BibTeX",
        "tools": [
          "bibtex"
        ]
      },
      {
        "name": "xelatex -> bibtex -> xelatex*2",
        "tools": [
          "xelatex",
          "bibtex",
          "xelatex",
          "xelatex"
        ]
      },
      {
        "name": "pdflatex -> bibtex -> pdflatex*2",
        "tools": [
          "pdflatex",
          "bibtex",
          "pdflatex",
          "pdflatex"
        ]
      },
    ],
    "latex-workshop.view.pdf.viewer": "tab",
    "editor.wordWrap": "on",
    "latex-workshop.latex.autoBuild.run": "onSave",
    "latex-workshop.latex.rootFile.useSubFile": false

}

相关内容