Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sticky code windows for contextually relevant code #52734

Closed
Hawkbat opened this issue Jun 23, 2018 · 6 comments
Closed

Sticky code windows for contextually relevant code #52734

Hawkbat opened this issue Jun 23, 2018 · 6 comments
Labels
*duplicate Issue identified as a duplicate of another issue(s) editor-bracket-matching Editor brace matching feature-request Request for new features or functionality

Comments

@Hawkbat
Copy link

Hawkbat commented Jun 23, 2018

I think having 'sticky' code windows at the top and bottom of editors which display a subset of contextually relevant lines of code that are currently out of view could be a very powerful feature.

The logic for identifying these contextually relevant lines could rely on existing code folding identification, which would also make it useful for languages like HTML to identify where the user is within a large tree of tags.

The biggest use case would be displaying all of the namespace, class, function, etc. headers and closing brackets, like in the following mockup.

mockup

These code windows should allow simple in-place editing, similar to the Peek Definition or Find All References code windows.

If there are too many lines to comfortably fit the code window, the windows could either become scroll-able or Code could display only the N lines closest to the current viewport.

The sections could also potentially be used for displaying other things like Find/Replace results or lines containing metadata. Language extensions could potentially contribute additional code spans they think are contextually relevant.

This is similar to #41666 but larger and more flexible in scope. It might have similar use cases to #9418.

I would argue that having the actual code for the hierarchy be visible and editable would make it easier for the user to "find their place" at a glance, as well as to make revisions to those lines, e.g. revising parameter signatures while working within a large function body.

@vscodebot vscodebot bot added editor editor-core Editor basic functionality labels Jun 23, 2018
@Ayplow
Copy link

Ayplow commented Jun 23, 2018

This would be incredibly useful for any object based language, making identification at a glance super easy, but the outline provide a very similar function, and this takes up much more screen space.

It seems like a nice idea, but has few use cases and likely take a lot of work. Even if the team does approve it, this likely wouldn't even be worked on for a year. If you really want this in the program, I'd recommend making a fork with a pull request to at least demonstrate basic functionality, else nothing will happen with this..

@Hawkbat
Copy link
Author

Hawkbat commented Jun 23, 2018

That's about what I expected. I figured I'd open a feature request anyway just in case. I'll get started on a fork to demonstrate some use cases.

@alexdima alexdima added editor-rendering Editor rendering issues feature-request Request for new features or functionality and removed editor editor-core Editor basic functionality labels Jun 26, 2018
@alexdima
Copy link
Member

Just FYI, we have something that is related on our roadmap: some form of breadcrumb inside editors that will be powered by the same data powering outline.

@alexdima alexdima added this to the Backlog milestone Jun 26, 2018
@alexdima alexdima removed their assignment Jun 26, 2018
@axefrog
Copy link

axefrog commented Jul 31, 2018

@alexandrudima Could you tell us a bit more about this?

@alexdima
Copy link
Member

alexdima commented Aug 2, 2018

@axefrog Download insiders, configure "breadcrumbs.enabled": true. Can't miss them.

@rebornix rebornix removed their assignment Sep 13, 2018
@alexdima alexdima modified the milestones: Backlog, Backlog Candidates Oct 25, 2019
@alexdima alexdima added editor-bracket-matching Editor brace matching and removed editor-rendering Editor rendering issues labels Oct 25, 2019
@alexdima
Copy link
Member

Let's track in #55075 (it has more upvotes at this time).

@alexdima alexdima added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 28, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) editor-bracket-matching Editor brace matching feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

5 participants