From the course: Visual Studio Code Productivity Tips

Unlock this course with a free trial

Join today to access over 24,000 courses taught by industry experts.

Explore and navigate code: Peek Definition

Explore and navigate code: Peek Definition

From the course: Visual Studio Code Productivity Tips

Explore and navigate code: Peek Definition

- [Instructor] Peak definition is one of my favorite features. It's a tool that allows us to explore the definition of a type, or a function, or a variable, or any other code element without leaving your current location in the code editor. Instead of navigating to a separate file or clicking on another tab, you can peek at the definition right where you are. Before I show you how to use it, in this first file, UseMathCode.js, let's take a look at where it's defined over here in this math line. It's down here in line 16, and what I want you to note is that there are two periods on the end of this comment. You'll see why I'm pointing this out in a minute. So, to invoke this, we'll go back to the first file. Right-click on min, choose Peak, Peak Definition. When you invoke this feature, Visual Studio Code displays an inline preview of the code. You can see it here. This peaked editor provides context without disrupting your current view. Now that you can scroll up and down to look at…

Contents