VSCODE和SumaturaPDF 跳转

VSCODE和SumaturaPDF 跳转

https://blog.csdn.net/GoodNightBaby/article/details/122037853

按照上述教程调试好之后,Ok了

"C:/Program Files/Microsoft VS Code/Code.exe" "C:/Program Files/Microsoft VS Code/resources/app/out/cli.js" --ms-enable-electron-run-as-node -r -g "%f:%l"

然后是VSCODE的setting.json

{
  "editor.fontSize": 25,
  "explorer.confirmDelete": false,
  "files.autoSave": "afterDelay",
  "editor.renderControlCharacters": true,
  "git.confirmSync": false,
  "git.autofetch": true,
  "editor.wordWrap": "bounded",
  "explorer.confirmDragAndDrop": false,
  "terminal.integrated.tabs.enabled": true,
  "workbench.editorAssociations": {
    "*.ipynb": "jupyter-notebook"
  },
  "notebook.cellToolbarLocation": {
    "default": "right",
    "jupyter-notebook": "left"
  },
  "security.workspace.trust.untrustedFiles": "open",
  "terminal.integrated.defaultProfile.windows": "PowerShell",
  "terminal.integrated.profiles.windows": {
    "C:/Program Files/Git/bin/bash.exe (migrated)": {
      "path": "C:/Program Files/Git/bin/bash.exe",
      "args": []
    }
  },
  "leetcode.endpoint": "leetcode-cn",
  "leetcode.workspaceFolder": "d:/PythonProject/leetcode",
  "leetcode.defaultLanguage": "python3",
  "markdown.preview.fontSize": 35,
  "terminal.integrated.fontSize": 25,
  "notebook.markup.fontSize": 1,
  // vscode默认启用了根据文件类型自动设置tabsize的选项
  "editor.detectIndentation": false,
  // 重新设定tabsize
  "editor.tabSize": 2,
  // #每次保存的时候自动格式化 
  "editor.formatOnSave": true,
  // #每次保存的时候将代码按eslint格式进行修复
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  // 添加 vue 支持
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "vue",
  ],
  // #让prettier使用eslint的代码格式进行校验 
  "prettier.eslintIntegration": true,
  // #去掉代码结尾的分号 
  "prettier.semi": false,
  // #使用带引号替代双引号 
  "prettier.singleQuote": true,
  // #让函数(名)和后面的括号之间加个空格
  "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
  // #这个按用户自身习惯选择 
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  // #让vue中的js按编辑器自带的ts格式进行格式化 
  "vetur.format.defaultFormatter.js": "vscode-typescript",
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      "wrap_line_length": 120,
      "wrap_attributes": "auto"
      // #vue组件中html代码格式化样式
    }
  },
  // 格式化stylus, 需安装Manta's Stylus Supremacy插件
  "stylusSupremacy.insertColons": false, // 是否插入冒号
  "stylusSupremacy.insertSemicolons": false, // 是否插入分号
  "stylusSupremacy.insertBraces": false, // 是否插入大括号
  "stylusSupremacy.insertNewLineAroundImports": false, // import之后是否换行
  "stylusSupremacy.insertNewLineAroundBlocks": false,
  "editor.unicodeHighlight.ambiguousCharacters": false,
  //------------------------------LaTeX 配置----------------------------------
  // 设置是否自动编译
  "latex-workshop.latex.autoBuild.run": "never",
  //右键菜单
  "latex-workshop.showContextMenu": true,
  //从使用的包中自动补全命令和环境
  "latex-workshop.intellisense.package.enabled": true,
  //编译出错时设置是否弹出气泡设置
  "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": "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"
      ]
    },
    {
      "name": "xelatex -> biber -> xelatex*2",
      "tools": [
        "xelatex",
        "biber",
        "xelatex",
        "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"
  ],
  //设置为onFaild 在构建失败后清除辅助文件
  "latex-workshop.latex.autoClean.run": "onFailed",
  // 使用上次的recipe编译组合
  "latex-workshop.latex.recipe.default": "lastUsed",
  // 用于反向同步的内部查看器的键绑定。ctrl/cmd +点击(默认)或双击
  "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
  //使用 SumatraPDF 预览编译好的PDF文件
  // 设置VScode内部查看生成的pdf文件 tab browser  external 
  "latex-workshop.view.pdf.viewer": "external",
  // PDF查看器用于在\ref上的[View on PDF]链接
  "latex-workshop.view.pdf.ref.viewer": "auto",
  // 使用外部查看器时要执行的命令。此功能不受官方支持。
  "latex-workshop.view.pdf.external.viewer.command": "C:/Users/UserName/AppData/Local/SumatraPDF/SumatraPDF.exe", // 注意修改路径
  // 使用外部查看器时,latex-workshop.view.pdf.external.view .command的参数。此功能不受官方支持。%PDF%是用于生成PDF文件的绝对路径的占位符。
  "latex-workshop.view.pdf.external.viewer.args": [
    "-forward-search",
    "%TEX%",
    "%LINE%",
    "-reuse-instance",
    "%PDF%"
  ],
  // 将synctex转发到外部查看器时要执行的命令。此功能不受官方支持。
  "latex-workshop.view.pdf.external.synctex.command": "C:/Users/UserName/AppData/Local/SumatraPDF/SumatraPDF.exe", // 注意修改路径
  // latex-workshop.view.pdf.external.synctex的参数。当同步到外部查看器时。%LINE%是行号,%PDF%是生成PDF文件的绝对路径的占位符,%TEX%是触发syncTeX的扩展名为.tex的LaTeX文件路径。
  "latex-workshop.view.pdf.external.synctex.args": [
    "-forward-search",
    "%TEX%",
    "%LINE%",
    "-reuse-instance",
    "-inverse-search",
    "\"C:/Program Files/Microsoft VS Code/Code.exe\" \"C:/Program Files/Microsoft VS Code/resources/app/out/cli.js\" -r -g \"%f:%l\"", // 注意修改路径
    "%PDF%"
  ],
  "openInExternalApp.openMapper": [
    {
      "extensionName": "md",
      "apps": [
        {
          "isElectronApp": true,
          "title": "typora",
          "openCommand": "C:\\Program Files\\Typora\\Typora.exe"
        }
      ]
    },
  ],
  "terminal.integrated.showExitAlert": false,
  "extensions.ignoreRecommendations": true,
  "latex-utilities.countWord.format": "${wordsBody} Words",
  "[latex]": {
    "editor.defaultFormatter": "James-Yu.latex-workshop"
  },
  "workbench.colorTheme": "Default Light+",
  "editor.inlineSuggest.enabled": true,
  "grammarly.files.include": [
    "**/readme.md",
    "**/README.md",
    "**/*.txt",
    "**/*.tex"
  ],
  "github.copilot.enable": {
    "*": true,
    "yaml": false,
    "plaintext": false,
    "markdown": true,
    "latex": true,
    "tex": true
  },
  "github.copilot.advanced": {},
  "update.mode": "none", // 两个选择器中是否换行
}
posted @ 2023-01-06 15:16  bH1pJ  阅读(155)  评论(0编辑  收藏  举报