카테고리 없음

[Visual Studio Code] terminal에서 code 명령어 입력하기

개발자_이훈규 2019. 2. 8. 09:30

보통 vs code내에서 설정을 통해 code 명령어를 입력시키는데 재부팅을 하게 되면 도로묵이 되고 만다.

그래서 아예 .bash_profile에 넣어놓는 것을 찾아보았다.



OK, it seems "ln" command not work for me (I use this command set up sublime text). But I got an another solution.

  1. edit your ~/.bash_profile file.

  2. add the following code in it. code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}

  3. after save. do not forget to run source ~/.bash_profile.

  4. Finished and test it, type code


https://apple.stackexchange.com/questions/294176/how-to-install-visual-studio-codes-code-command-permanently