VSCode

Visual Studio Code (VS Code) is a popular code editor developed by Microsoft.

Workspace

Now, please create a new folder in an appropriate location to store your code, for example: ~/Code.

All the code you use in the future will be stored here.

Install VS Code

Go to the Visual Studio Code website and download it and install it.

Here is what it looks like

Install ‘code’ Command

Press command + shift + p, and input ’shell’, and click the first menu

Basic Usage

1. Opening a Folder or File

  • Open a Folder: Click on File > Open Folder... to open an entire project folder.

  • Open a File: Click on File > Open File... to open a single file.

2. Creating a New File

  • Click on File > New File, or use the shortcut Ctrl + N (Windows/Linux) or Cmd + N (macOS).

3. Writing Code

  • Start typing your code in the editor. VS Code supports syntax highlighting for many programming languages.

4. Installing Extensions

Extensions enhance the functionality of VS Code. To install extensions:

  • Click on the Extensions view icon in the Activity Bar on the side of the window (or press Ctrl + Shift + X).

  • Search for the extension you want (e.g., Python, JavaScript, etc.).

  • Click Install on the desired extension.

5. Running Code

You can run code directly in the terminal:

  • Open the terminal by clicking on Terminal > New Terminal.

  • Navigate to your project folder if needed using cd.

  • Run your code using the appropriate command (e.g., python filename.py for Python).

Step 5: Customizing VS Code

You can customize VS Code to suit your preferences:

  • Themes: Change the theme by going to File > Preferences > Color Theme.

  • Settings: Access settings by clicking on the gear icon in the lower left corner and selecting Settings.

Conclusion

Visual Studio Code is a versatile tool that can greatly enhance your coding experience. By following this guide, you should now have a basic understanding of how to install and use VS Code. Explore its features, install useful extensions, and customize it to fit your workflow. Happy coding!