microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.9k stars 29.17k forks source link

Minimap Enhancement: Adding File Structure Tree #24871

Closed bmargogne closed 5 years ago

bmargogne commented 7 years ago

Using VS Code 1.11.2 [This is an idea for a new feature, not an issue]

When coding in particularly long files, it would be nice to have some additional navigation possibilities using the minimap. For instance, if we could define a file tree structure (similar to a table of content for any typical ".doc" document), we could easily understand the overall content of a file, and quikly go the desired portion of code.

Here is what it could look like : http://hpics.li/06f785f

Some additional ideas :

"simple" file sections could be declared using keywords in full commented lines (not sure if this is feasable on all file type...). If such keywords are used in commentaries, I guess they would not harm the code when used outside of VScode ! Eg: ////// [Minimap.section : Name of the section] ////////////////////////////////////

Sections names should be highligthed in the minimap to ease identification. When truncated, the full section name could appear using a rollover.

[+] or [-] icons next to sections in the minimap would allow expanding/collapsing minimap portion of codes. When fully collapsed, it would display a kind of "table of content" for the file.

With "hierarchical" file sections, a user could even define nested parts in his file structure. ////// [Minimap.sectionH1 : { some section name } /////////////// ////// [Minimap.sectionH2 : { some subSection name } ///////////

m-schuetz commented 6 years ago

Apart from manually defining sections, it would also be nice if sections could be automatically deducted from namespaces/classes/functions, which would help users to find their way through the code. For example, the functions in a file could be highlighted in the minimap like this:

image

That way, users can quickly get an overview of the available functions and where to go next.

vscodebot[bot] commented 5 years ago

We closed this issue because we don't plan to address it in the foreseeable future. You can find more detailed information about our decision-making process here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding and happy coding!