tips, sharing,

How to configure Open a project in Visual Code from terminal

Donald Donald Follow Feb 12, 2024 · 1 min read
How to configure Open a project in Visual Code from terminal
Share this

How to configure Open a project in Visual Code from terminal

Owner: josdoaitran Verification: Verified Tags: Tips Date: February 12, 2024

In this post, I share with you the way to work more effectively to open a project on Visual Code when we are working on Terminal. In real scenario, after we just cloned a new repository via Terminal, you can use this open Terminal console to open the project in Visual Code to save time instead doing more steps (Open Visual Code and using Open Menu to point out the directory of new repository that we expect to open).

In order to do that, we have to do some essential steps on the first time we open a folder on Visual Code from Terminal.

Open Visual Code, we can use this hot-key to open Prompt:

  • Command + Shift + P on Mac
  • Control + Shift + P on Windows

Then, we input the value “Shell” to search “Shell Command: Install Code command in PATH

For instance,

walking

We click on “Shell Command: Install Code command in PATH

walking

Click on Ok button to setup Code value on Path of your terminal profile.

Then, we can see this message

walking

From now, we can use our terminal to open any folder from Terminal

For example, I am going to open this folder selenium-everything, I will access my terminal to this folder and run this command: code .

Beside that, we also open the project or folder on Visual Code editor from anywhere, by this command: code .\home\test\selenium-everything\

                               — Copyright 2024 — 
Join Newsletter
Get the latest news right in your inbox. We never spam!
Donald
Written by Donald
Hi, I am Donald (Doai Tran), the author of Testing4Everyone. I hope you like it!