반응형

1. code runner 설치 및 c/cpp 컴파일러 설치

https://taking.kr/blog/archives/4825.html

 

간단한 VS Code 윈도우 C / C++ 컴파일 환경설정하기 (php, python, java … etc 적용 가능) | Taking 블로그

간단한 VS Code 윈도우 C / C++ 컴파일 환경설정하기 (php, python, java ... etc 적용 가능) "C / C++ 뿐만 아니라 다양한 언어 또한 쉽게 컴파일 환경설정을 하기 위한 글이다."   1. Visual Studio Code (이하 VS Code)   VS Code는 Microsoft 사에서 만든 심플하고 | IT 정보, 워드프레스 정보, 워드프레스 팁, 각종 유용한 팁들

taking.kr

 

2. 공백 2로 줄이기

 

Ctrl + , 입력 후 아래 설정부분에 tab size 를 4->2로

 

 

3. 코드 실행시 입력이 필요한 경우 입력 가능하게 하기

https://www.youtube.com/watch?v=LNY9HGn-TYk 

 

Ctrl + , -> 검색에서 run code 입력 -> Code-runnder: Run in Terminal 체크하기



4. 파이썬 설치

https://www.python.org/


5. settings.json 설정 파일 다음과 같이 바꾸기


{
"code-runner.executorMap": {
"javascript": "node",
"java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
"cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
// Window 10 에서는 Default Shell 이 Powershell이기 때문에 cmd로 변경해야 정상적으로 실행 됨.
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\cmd.exe",
"objective-c": "cd $dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"php": "php",
"python": "python",
"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",
"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.runInTerminal": true,
"editor.tabSize": 2,
}




반응형