Open4

VSCodeのおすすめ設定

大野 周平大野 周平

LaTeX Workshopの日本語・BibTeX対応

    //https://github.com/James-Yu/LaTeX-Workshop/wiki/Compile#latex-recipes
    //https://texwiki.texjp.org/?Latexmk
    "latex-workshop.view.pdf.viewer": "tab",
    "latex-workshop.latex.recipes": [
        {
          "name": "latexmk 🔃",
          "tools": ["latexmk"]
        }
    ],
    "latex-workshop.latex.tools": [
      {
          "name": "latexmk",
          "command": "latexmk",
          "args": [
            "-interaction=nonstopmode",
            "-pdfdvi",
            "-latex=platex",
            "-synctex=1",
            "-e",
            "$dvipdf='dvipdfmx %O %S';$bibtex='pbibtex';$makeindex='mendex';",
            "%DOC%"
          ],
          "env": {}
      }
    ],
大野 周平大野 周平

Code Runner

デフォルトに

  • Fortran (.f,.F77,.f90,.f95)
  • Julia (.jl)
  • HTML (.html)
  • SVG (.svg)
  • gnuplot (.plt)
  • PHP (.php)

を追加. 各種のコンパイラ等は事前にインストールしておくこと.

    "code-runner.executorMap": {
        "javascript": "node",
        "java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
        "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "objective-c": "cd $dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "php": "cd $dir && php $fileName > $fileNameWithoutExt.html && chrome $fileNameWithoutExt.html",
        "python": "python",
        "perl": "perl",
        "perl6": "perl6",
        "ruby": "ruby",
        "go": "go run",
        "lua": "lua",
        "groovy": "groovy",
        "powershell": "powershell -ExecutionPolicy ByPass -File",
        "bat": "cmd /c",
        "shellscript": "cd $dir && bash $fileName",
        "fsharp": "fsi",
        "csharp": "scriptcs",
        "vbscript": "cscript //Nologo",
        "typescript": "ts-node",
        "coffeescript": "coffee",
        "scala": "scala",
        "swift": "swift",
        "julia": "julia",
        "crystal": "crystal",
        "ocaml": "ocaml",
        "r": "Rscript",
        "applescript": "osascript",
        "clojure": "lein exec",
        "haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
        "rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt",
        "racket": "racket",
        "ahk": "autohotkey",
        "autoit": "autoit3",
        "dart": "dart",
        "pascal": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
        "d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
        "haskell": "runhaskell",
        "nim": "nim compile --verbosity:0 --hints:off --run",
    },

    "code-runner.executorMapByFileExtension": {
        ".tex": "cd $dir && platex.exe -synctex=1 -interaction=nonstopmode $fileNameWithoutExt.tex && dvipdfmx.exe $fileNameWithoutExt.dvi",
        // ".tex": "cd $dir && latexmk -pdfdvi -latex=xelatex -synctex=1 -e \"$dvipdf='xdvipdfmx %O %S';$bibtex='pbibtex';$makeindex='mendex';\" $fileNameWithoutExt.tex",
        ".plt": "gnuplot $fullFileName",
        ".svg": "chrome $fullFileName",
        ".html":"chrome $fullFileName",
        ".f90": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt -fbacktrace -fbounds-check -fpe0",
        ".f95": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt -fbacktrace -fbounds-check -fpe0",
        ".F77": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt -fbacktrace -fbounds-check -fpe0",
        ".f"  : "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt -fbacktrace -fbounds-check -fpe0",
        ".vb":  "cd $dir && vbc /nologo $fileName && $dir$fileNameWithoutExt",
        ".vbs": "cscript //Nologo",
        ".jl":  "cd $dir && Julia $fileName",
        ".jlp": "cd $dir && Julia -p 2 $fileName",
        ".scala": "scala",
        ".cr": "crystal",
        ".ml": "ocaml",
        ".exs": "elixir",
        ".hx": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
        ".rkt": "racket",
        ".ahk": "autohotkey",
        ".au3": "autoit3",
        ".kt": "cd $dir && kotlinc $fileName -include-runtime -d $fileNameWithoutExt.jar && java -jar $fileNameWithoutExt.jar",
        ".kts": "kotlinc -script",
        ".dart": "dart",
        ".pas": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
        ".pp": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
        ".d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
        ".hs": "runhaskell",
        ".nim": "nim compile --verbosity:0 --hints:off --run",
        ".csproj": "dotnet run --project",
        ".fsproj": "dotnet run --project",
    },