VSCode-ObjectScript-HowTo

Tips for Using Visual Studio Code

Here are a few tips to help you get the most out of Visual Studio Code.


Editor Playground

If you just getting started with Visual Studio Code you can try the Editor Playground under Help > Editor Playground. Here you learn how to use some of the powerful code editing features.

Use the Command Palette

The Command Palette is a powerful tool that allows you to access almost any feature or command in Visual Studio Code quickly and easily. Here you also can look up quickly the keybindings in case you forgt one. To open the Command Palette, press Ctrl + Shift + P (Windows/Linux) or Cmd + Shift + P (macOS).

Use the Built-in Terminal

Visual Studio Code includes a built-in terminal that you can use to run command-line tools, such as git and npm. To open the terminal, press Ctrl + Shift + Ö (Windows/Linux) or Cmd + Shift + Ö (macOS).

Use Code Snippets

Visual Studio Code includes a wide variety of built-in code snippets that can save you time when writing code. For example, you can type “for” and then press Ctrl + Space (Windows/Linux) or Cmd + Space (macOS) to quickly create a for loop. You can also create your own custom code snippets by going to File > Preferences > Configure User Snippets.

Customize the Theme

Visual Studio Code includes several built-in themes that you can use to customize the look and feel of the editor. You can change the theme by going to File > Preferences > Color Theme. To find more themes you can use the marketplace.

Use Extensions

Visual Studio Code has a vast ecosystem of extensions that add new features and functionality to the editor. You can browse and install extensions by going to File > Extensions. View Essential visual Studio Code Extensions.

Learn the Keyboard Shortcuts

Visual Studio Code has a large number of keyboard shortcuts that can help you work faster and more efficiently. You can view the full list of keyboard shortcuts by going to File > Preferences > Keyboard Shortcuts, where you also can customize the keyboard shortcuts. View Visual Studio Code Keyboard Shortcuts.

Format on Save

Its not always easy to keep your code in a good readable condition manually. Thankfully Visual Studio Code provides a formatter for almost every language. To format your file at the same time when you save your file, you can enable the Format On Save feature:

Sticky Scroll

When working in code with long classes and methods that stretch beyond the vertical size of your screen, it can be difficult to keep track of which scope you’re working in. You may be editing a long method or exploring an unfamiliar codebase. Visual Studio Code now offers a feature to have a better overview of your code: Sticky Scroll

Customize the settings

Visual Studio Code allows you to customize various settings, such as the font size, tab size, and the number of spaces used for indentation. You can access these settings by going to File > Preferences > Settings (or Code > Preferences > Settings on a Mac). Here, you can edit the settings.json file, which contains all of your Visual Studio Code settings.

Here you can find useful settings as well as

Settings Sync

You can sync your settings, keybindings and extensions across all devices with Settings Sync. Just log in with your GitHub or Microsoft user.

Use code navigation features

Visual Studio Code includes features such as Go to Definition, Find All References, and Peek Definition, which can be useful for navigating through your codebase.

FiraCode Font

Install the FiraCode Font to replace symbols that are encoded with several characters, such as >= or !=, to one symbol.

Create your own Extensions

Visual Studio Code offers a wide variety of extensions and there is almost a extension for everthing. But sometimes you run into a problem where no extension exists to solve this problem. That could be the point to start creating your own extensions.


Next Chapter

Previous Chapter

Overview

by Philipp B.