Method List in Visual Studio Code

2020-05-11 00:10发布

I've recently started using the Visual Studio Code editor. I'm really loving it, but there's one critical feature (for me) that I haven't been able to find. Is there a method list, similar to the Navigator in NetBeans or Member dropdown in Visual Studio?

17条回答
再贱就再见
2楼-- · 2020-05-11 00:41

Take a look at Show Functions plugin. It can list functions, symbols, bookmarks by configurable regular expressions. Regular expressions are a real saver, expecially when you're not using a mainstream language and when CodeOutline doesn't do the job. It's ugly to see a split window with these functions (CodeOutline seems to be better integrated) but at least there's something to use

查看更多
甜甜的少女心
3楼-- · 2020-05-11 00:42

CTRL+F12 (CMD+F12 for Mac) - opens for me all methods and members in PHP class.

查看更多
三岁会撩人
4楼-- · 2020-05-11 00:42

In 2020 version of VSCode
Cmd+P

  • # - Find symbol across files
  • @ - Find symbol within file
  • @: - Group symbols within a file

Symbols in a file VS Code v1.44.0

查看更多
Emotional °昔
5楼-- · 2020-05-11 00:46

UPDATE: The extension features are now built-in and the extension itself is now deprecated

I have found this extention: Code Outline. This is how it looks like:


This is how it looks like


I believe that is what you have been looking for.

查看更多
相关推荐>>
6楼-- · 2020-05-11 00:46

There's no such feature today, the CTRL+SHIFT+O == CTRL+P @ doesn't work for all languages.

As a last resort you can use the search panel - although it is not so fast an easy to use as you'd like - you can enter this regex in the search panel to find all functions:

function\s([_A-Za-z0-9]+)\s*\(
查看更多
冷血范
7楼-- · 2020-05-11 00:46

Open symbol by name : CTRL+T might be what you are looking for. Works perfectly with my TypeScript project.

查看更多
登录 后发表回答