See how to use VS Code to edit different parts of the same file—or even different files—in a side-by-side viewing format.
- [Narrator] A common scenario when editing source code…is that you often want to edit one part of a file…while keeping another part of the file in view…or you want to view two different files at the same time…so you can refer to one while editing the other.…VS Code makes this easy by allowing you to open editors…side by side for either the same file…or multiple different files.…There are a couple of ways to do this.…So let's open index.html.…To work on the same file in side by side mode,…you can just type command backslash or control backslash.…
You can also click on the split editor icon up here…in the tabs strip or right click on the file name…in the explorer list and choose open to the side.…You can then scroll to different parts of the file…and work on each one.…To do this with different files, you can simply right click…on the other file and choose open to the side.…When you do this, the open editor section of the explorer…shows subfolders for left and for right.…
The default behavior is to display the files side by side…
Joe Marini kicks off the course by taking you through the app's user interface, and showing how to work with its basic editing features. Next, Joe demonstrates how to customize VS Code by configuring preferences, setting your own keyboard shortcuts, and working with snippets. He also explains how to maximize your productivity by installing and managing extensions from the Visual Studio Marketplace. Plus, he discusses how VS Code works with folders and collections of files, helps you understand the IntelliSense feature, and dives into the app's advanced code editing features, such as automatic formatting.
- Installing Visual Studio Code
- The VS Code UI
- Understand how VS Code works with built-in Git integration
- Customizing VS Code
- Configuring preferences
- Setting keyboard shortcuts
- Using extensions
- Working with snippets
- Using VS Code to edit different parts of the same file
- Using multiple selections
- Understanding how VS Code works with JSON files