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:47

In VSCode 1.24 you can do that.

Right click on EXPLORER on the side bar and checked Outline.

查看更多
闹够了就滚
3楼-- · 2020-05-11 00:49
ctrl+shift+o // This should work for javascript files by default

For PHP install the extension PHP SYMBOLS

FOR PYTHON install the extension PYTHON

On Reload, this will work fine

查看更多
等我变得足够好
4楼-- · 2020-05-11 00:50

There is a new release that can do that! Check here the latest release notes regarding code outline

enter image description here

查看更多
▲ chillily
5楼-- · 2020-05-11 00:52

Yes, there is the workbench.action.gotoSymbol command. On Windows and Linux it's set to CTRL+Shift+O by default.

If this command isn't available for the file types you are working with then you should take a look at the VSCode extensions. Not all languages support this feature.

查看更多
来,给爷笑一个
6楼-- · 2020-05-11 00:58

Invoke Code's Go to symbol command:

  • macOS: cmd+shift+o (the letter o, not zero)

  • Windows/Linux: ctrl+shift+o

Typing a colon (:) after invoking Go to symbol will group symbols by type (classes, interfaces, methods, properties, variables). Then just scroll to the methods section.

查看更多
登录 后发表回答