Being able to run VSCode from terminal with simple command is so nice like following
$ code .
but sometimes it doesn't happen because PATH hasn't been configured properly or it has been modified since you last set it up. Whatever the reason, VSCode has a remedy.
- Press CMD+Shift+P
- Type 'shell'
- Choose 'Shell Command: Install 'code' command in PATH' as below:
Now, you can run code from your terminal.
Happy Coding!