Home >Development Tools >VSCode >How to search for functions in vscode

How to search for functions in vscode

藏色散人
藏色散人Original
2019-12-23 10:05:315938browse

How to search for functions in vscode

How to search for functions in vscode? How to find the definition of a function across files in the vsCode editor?

Question:

For example:

Used in a.js

var res = window.unique(arr);

Unique is defined in an unknown js file

window.unique = fuction(arr){
   return [...new Set(arr)];
}

Now how to quickly locate the definition location of unique in a.js?

Answer:

Hold down Ctrl to create=> ;Point the mouse to the defined function name=>Click the mouse, and the result will jump to the defined function file and the cursor will automatically point to the current function position

Related recommendations:vscode introductory tutorial

The above is the detailed content of How to search for functions in vscode. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn