foxiangzun 发表于 2021-10-19 11:35
话不多说,直接上图
中文乱码
可能是因为你新建的文件编码是GBK,右下角UTF8处点进去重新以GBK编码打开就好了
复制以下设置粘贴到下图所示位置。
"files.autoGuessEncoding": true, // 自动猜测文件编码并打开
"code-runner.temporaryFileName": "",
"code-runner.preserveFocus": false,
"code-runner.runInTerminal": true, // CodeRunner 在内建终端中运行程序
"code-runner.ignoreSelection": true,
"code-runner.saveFileBeforeRun": true,
"code-runner.showRunCommandInEditorContextMenu": false,
"code-runner.showRunCommandInExplorerContextMenu": false,
"code-runner.executorMap": {
"javascript": "node",
"java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
"c": "gcc -fexec-charset=GBK $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"cpp": "g++ -fexec-charset=GBK $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"objective-c": "gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"php": "php",
"python": "python $fileName",
"perl": "perl",
"perl6": "perl6",
"ruby": "ruby",
"go": "go run",
"lua": "lua",
"groovy": "groovy",
"powershell": "powershell -ExecutionPolicy ByPass -File",
"bat": "cmd /c",
"shellscript": "bash",
"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",
// "rust": "cargo run $fileName",
"racket": "racket",
"scheme": "csi -script",
"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",
"lisp": "sbcl --script",
"kit": "kitc --run",
"v": "v run",
"sass": "sass --style expanded",
"scss": "scss --style expanded",
"less": "cd $dir && lessc $fileName $fileNameWithoutExt.css",
"FortranFreeForm": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"fortran-modern": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"fortran_fixed-form": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"fortran": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt"
},
本帖最后由 foxiangzun 于 2021-10-19 11:36 编辑
hrpzcf 发表于 2021-10-19 09:40
这个是安装vscode的时候要勾选添加到右键菜单的,是我疏忽了
你重新安装一遍,安装的时候注意 ...
话不多说,直接上图
中文乱码
程序运行了,控制台却没出来。。
hrpzcf 发表于 2021-10-19 09:40
这个是安装vscode的时候要勾选添加到右键菜单的,是我疏忽了
你重新安装一遍,安装的时候注意 ...
非常感谢,那我再试试
回复一下大哥
多谢分享,一步步学习
foxiangzun 发表于 2021-10-19 09:34
和教程无关,教程写的很棒了,应该是我操作系统的问题,点右键,没有“VS打开”这一项。。只能说用惯了集 ...
foxiangzun 发表于 2021-10-19 09:34
和教程无关,教程写的很棒了,应该是我操作系统的问题,点右键,没有“VS打开”这一项。。只能说用惯了集 ...
这个是安装vscode的时候要勾选添加到右键菜单的,是我疏忽了{:10_250:}
你重新安装一遍,安装的时候注意勾选就行了,不用卸载,直接覆盖安装。
hrpzcf 发表于 2021-10-18 17:25
有什么问题发出来嘛,也许很容易解决呢,我也可以改进教程里说不明白的地方
和教程无关,教程写的很棒了,应该是我操作系统的问题,点右键,没有“VS打开”这一项。。只能说用惯了集成式的工具,再去用自由式的自己 DIY,就会发现自己是真手残{:5_100:}
再次感谢分享{:5_110:}
谢谢
11
学到了学到了
1
foxiangzun 发表于 2021-10-18 17:06
感谢楼主分享,但是折腾了三天。。实在折腾不动了。。总能有莫名其妙的问题出现。。弃坑了。。直接换成 cod ...
有什么问题发出来嘛,也许很容易解决呢,我也可以改进教程里说不明白的地方{:10_281:}
感谢楼主分享,但是折腾了三天。。实在折腾不动了。。总能有莫名其妙的问题出现。。弃坑了。。直接换成 code::blocks 了。。{:5_100:}
谢谢
谢
谢谢
look look
看看
1111