Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to jump to definition for a file in node_modules from VS Code

I have the following file open in Visual Studio Code:

@import "~normalize.css/normalize.css";
@import "./fonts.css";
body {
  padding: 0;
  font-family: "Raleway", sans-serif;
}

I want to be able to navigate from there to the CSS files imported. I assumed I should use something like Cmd/Ctrl+Click but that doesn't work. Any idea?

like image 478
Sammy Avatar asked Jan 29 '18 11:01

Sammy


People also ask

How do you jump to define in VS Code?

Go to Definition If a language supports it, you can go to the definition of a symbol by pressing F12. Tip: You can jump to the definition with Ctrl+Click or open the definition to the side with Ctrl+Alt+Click.

How do you link a feature file with step definition in Visual Studio Code?

Place your cursor on the step in your feature file. Right-click and select Go To Step Definition from the menu (F12). The file containing the binding is opened at the appropriate step definition method.

What does Ctrl d do in VS Code?

Ctrl+D selects the word at the cursor, or the next occurrence of the current selection. Tip: You can also add more cursors with Ctrl+Shift+L, which will add a selection at each occurrence of the current selected text.

How do I search for a file in VS Code?

Click the File Search on the status bar on the bottom of the VSCode IDE. You can also use a keyboard shortcut, Control+Shift+P in Windows or Command+Shift+P on MacOS, to open the command palette and choose Now: Global Search from the list.


1 Answers

This VS Code extension will provide the functionality you're looking for.

Once installed, just use F12 to open the source.

like image 106
Daniel Fletcher Avatar answered Oct 06 '22 23:10

Daniel Fletcher