How to show code outline in Visual Studio?

前端 未结 19 752
情歌与酒
情歌与酒 2020-12-13 12:26

This kind of stuff exists in Eclipse:

\"alt

But I\'ve not found it in Visual Studio yet. Is ther

相关标签:
19条回答
  • 2020-12-13 12:43

    You can use the Class View Window, or you can use outlining to collapse the code window to definitions (Ctrl-M-O and Ctrl M-L in the standard keyboard set up)

    0 讨论(0)
  • 2020-12-13 12:43

    I've started using VSCommands 10.

    This has support for the most common languages used when developing in Visual Studio 2010, including JavaScript.

    0 讨论(0)
  • 2020-12-13 12:47

    Trick is to call Ctrl+F2, then Tab, then Tab, then Down arrow. I've done it with this simple AutoHotkey script when I hit Ctrl+o:

    #IfWinActive ahk_exe devenv.exe
    ^o::
      Send ^{F2}
      Send {Tab}
      Send {Tab}
      Send {Down}
      return
    #IfWinActive
    

    It will show dropdown that is closest to Quick Outline in Eclipse or others.

    0 讨论(0)
  • 2020-12-13 12:48

    Also non-free, but Jetbrains Resharper provides a File Structure Window, what perhaps is what you are searching for.

    To display this dockable window, select from the menu: ReSharper → Windows → File Structure (default shortcut Ctrl+Alt+F

    0 讨论(0)
  • 2020-12-13 12:50

    In VS2017 you can navigate between items in the file directly from the upper right corner of the Editor.

    Screenshot

    0 讨论(0)
  • 2020-12-13 12:51
    • not free, but if you install Visual AssistX, each document gets a dropdown box listing all methods in a file (alphabetically or in the order they occur)

    • check Class View again, it does show functions (but not per document). Also check out the Code Definition Window, extremely nice when combined with Class View.

    0 讨论(0)
提交回复
热议问题