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

Minimap #5308

Open
JosephTLyons opened this issue Jul 9, 2022 · 60 comments
Open

Minimap #5308

JosephTLyons opened this issue Jul 9, 2022 · 60 comments
Labels
design [core label] enhancement [core label] potential extension Functionality that could be implemented as an extension (consider moving to community extensions)

Comments

@JosephTLyons
Copy link
Collaborator

No description provided.

@JosephTLyons JosephTLyons added the enhancement [core label] label Jul 9, 2022
@exalted
Copy link
Contributor

exalted commented Jul 9, 2022

FWIW, I am strongly against this 👎

@aexvir
Copy link
Contributor

aexvir commented Jul 9, 2022

I'm also not a fan, it brings me zero value and it's distracting and takes space
but as long as it's optional I don't see why it couldn't be added
there is definitely people who likes it

@OldManFroggy
Copy link

OldManFroggy commented Jul 14, 2022

best way I have seen a minimap implemented is -> inside a scroll bar, I think VSCode does it this way and as such takes up no extra UI space.

also a minimap should only show only selections, and lsp errors,warnings only in the minimap, changed lines of code (aka. git status) -> which makes minimap very functional and not just lipstick on a pig.

@aexvir
Copy link
Contributor

aexvir commented Jul 14, 2022

@scott-ling the default vscode minimap? it works nothing like that for me 🤔 am I missing some config?
the only editor I recall showing the errors and warnings on the scrollbar is the intellij platform one but that's not really the minimap being discussed here; and usually git status indicators are on the left gutter, not on the minimap either

would you mind showing how the minimap looks for you on vscode? 😅
I'm curious if I have been missing some nice fancy features all this time 😆

@OldManFroggy
Copy link

OldManFroggy commented Jul 14, 2022 via email

@aexvir
Copy link
Contributor

aexvir commented Jul 14, 2022

can't see anything 😅 did the screenshot get attached?
but alright, I've reenabled it on vscode and I can indeed see the selections or search results in the minimap
I don't think this is very useful for me, especially seeing how much space the minimap takes
but yeah, I get your point

Screenshot 2022-07-14 at 21 52 13

@OldManFroggy
Copy link

OldManFroggy commented Jul 14, 2022

never said I was intelligent, seems github email drops images - ps. this is VSCode Insiders but think feature is on main branch also.

See its in scroll bar -> not the mini map view setting which I never use, as stated above wastes soo much space :)

image

@aexvir
Copy link
Contributor

aexvir commented Jul 14, 2022

oh, hold up, that's something different... that's the scrollbar itself, which I have butchered with custom css 🤣
yep, this is what I know from intellij based editors, but I wasn't aware vscode also had it
I turned off scrollbars looong time ago 😅

yeah, this is definitely more useful 👍🏻

@OldManFroggy
Copy link

OldManFroggy commented Jul 14, 2022 via email

@JosephTLyons
Copy link
Collaborator Author

JosephTLyons commented Jul 14, 2022

I'm dyslexic (being a dyslexic dev is a weird thing, but that's another story), so I often recognize code by the shape of it - which is where the minimap becomes useful for me. I've never cared for the decorators in the scrollbar (JetBrains' IDEs) because I can't see the code's shape there, which is important to me.

@hovsater hovsater mentioned this issue Jul 22, 2022
@mikayla-maki mikayla-maki added the design [core label] label Aug 5, 2022
@JosephTLyons JosephTLyons added the potential extension Functionality that could be implemented as an extension (consider moving to community extensions) label Sep 3, 2022
@uicowboy
Copy link

uicowboy commented Oct 23, 2022

I think the minimap by itself is not very useful. However, it's actually really nice when it shows red/yellow lines for ESLint and/or TypeScript errors/warnings throughout the entire file, allowing you to quickly click on that area of the minimap and scrolling you down to where the issue is.

@heyallan
Copy link

heyallan commented Dec 20, 2022

I also recognize code by it's shape. It's super useful. But I prefer seeing an outline of the document (like a table of contents). It gives me shape but also meaning in less space.

The breadcrumb feature already creates an outline, but only line by line, which is weird because if I am already at that line I already know where I am.

A document outline (as a form of minimap) would be useful for large documents.

Also, hints in the scrollbar are immediately useful.

@JosephTLyons
Copy link
Collaborator Author

@heyallan,

You're probably already aware of this, but in case you haven't seen this, we do have a search buffer symbols action that gives you a modal popup where you can see the overview of the current file's symbols. You can then filter down to what you want and be taken to that point in the code.

SCR-20221220-lup

@heyallan
Copy link

@JosephTLyons Exactly. The functionality is already there. I just would like to have it permanently open on the side as a form of minimap.

@natempv
Copy link

natempv commented Mar 28, 2023

fwiw I love the minimap for giving the code a shape and body, helps me navigate it by feel, like a few people have mentioned already. like i know where things are from the topology of the thing, like it's a kaiju or a battleship. i've come to understand this is atypical but

also because I'll occasionally annotate my code with huge ascii/ansi art, kind of like xcode's //MARK comments but I usually just use figlet

@wzxu
Copy link

wzxu commented Mar 31, 2023

Also using the minimap to quickly navigate code by shape and colors.
Would love a similar option to not render actual characters (makes the shape & color fuller and easier to scan).

image

image

@ojkelly
Copy link

ojkelly commented Apr 6, 2023

I've found minimaps really useful for many of the reasons mentioned here. While I am missing them in Zed, solving for that might not require a minimap.

First, I rebound the outline to cmd-o to make it much quicker to open. The fact it's syntax highlighted, and searchable makes it more useful than a minimap for moving around in a file.

  {
    "bindings": {
      "cmd-o": "outline::Toggle"
    }
  }

However, I still find myself missing how vscode indicates problems in the file tree and minimap.

The problem multi-buffer is a really neat idea, but I don't find it useful for more complex problems. (The amount of padding and UI chrome can sometimes make things feel disconnected).

I think I could live without a minimap if the file tree and outline had a color/underline/dot/something to indicate a problem/warning.

I seem to be a very spatial programmer, in that I rarely search, and instead navigate to the file and part of the file when looking for something, or solving a bug. I think this is my brain indexing on where something is more than what it was named.

Given Zed's opportunity to rethink much of the IDE, and as much as I do love minimaps, I'm keen to see what you folks come up with.

@ShayTSC
Copy link

ShayTSC commented Apr 7, 2023

@heyallan,

You're probably already aware of this, but in case you haven't seen this, we do have a search buffer symbols action that gives you a modal popup where you can see the overview of the current file's symbols. You can then filter down to what you want and be taken to that point in the code.

SCR-20221220-lup

This feature is really good on backend, but for the frontend code sometimes you have some annoying and long JSX function, in symbol view it looks like this. (Not very helpful) It will be so good if that symbol view can parse JSX!

CleanShot 2023-04-07 at 13 45 19@2x

@exalted
Copy link
Contributor

exalted commented Apr 7, 2023

I seem to be a very spatial programming, in that I rarely search, and instead navigate to the file and part of the file when looking for something, or solving a bug. I think this is my brain indexing on where something is more than what it was named.

I love this insight!

@cktang88
Copy link

I think it would be nice to have configurable minimap, either in the scrollbar or standalone, since there's no clear consensus here.

@arguiot
Copy link

arguiot commented Apr 24, 2023

I really got used to minimaps. I'm not dyslexic but I do use it to recognise the shape of the code on long files. The other use case that I found SUPER useful is the MARK statements in Xcode.

@aeturnum
Copy link

Hey there - very excited about Zed - I wanted to echo others' comments about coming to rely on minimaps to navigate larger projects. At this point the lack of the option is a blocker on using adopting any new editor as a main editor.

I understand why people bring up search buffer symbols but I want to emphasize how the minimap feature allows you to spatially organize files by section and recognize layout. I both understand why some people don't care and want to encourage the Zed team to think about this as a core feature of a modern editor.

@fxsalazar
Copy link
Contributor

fxsalazar commented May 20, 2023

Here's the alternative Display hunks/diagnostics/search results in scroll bar that I'm personally looking forward to and kind of mentioned here #5308
Let's 👍🏽 it up.

@JosephTLyons
Copy link
Collaborator Author

Here's the alternative Display hunks/diagnostics/search results in scroll bar that I'm personally looking forward to and kind of mentioned here #5308

Let's 👍🏽 it up.

Git diff in scrollbar will be landing this next Wednesday, if all goes to plan.

@diocletiann
Copy link

diocletiann commented May 30, 2023

Any chance of ticks in the scrollbar for bookmarks/errors/warnings/todo/etc like JetBrains? Even better if they were clickable.

What's the keybind for search buffer symbols? Can't find it. (edit: found it, "outline view").

mikayla-maki pushed a commit that referenced this issue Jan 30, 2024
Release Notes:

- Added highlighted symbols to the scrollbar; partially mentioned in:
  - #5308
  - #4866
@nicholas-ochoa
Copy link

Just to add another example of usefulness, I haven't seen Sublime Text mentioned in this issue so far. When I find or highlight a symbol it highlights all instances of that symbol in the minimap which is very useful. Also, any lint / syntax errors and warnings are highlighted in the minimap:

Screen.Recording.2024-02-15.at.9.28.32.AM.mov

@nazmul-pro
Copy link

Minimap is so useful for so many reasons. Please add it as optional for those people who don't like it. But it is a really useful one as too many people asked above mentioned with usage. Someone said it is space-consuming! Do we write code across the entire area of our screen? If we split the screen and use multiple windows that could be a reason that it may take space otherwise it won't. In this case you can disable the feature

@zarifpour
Copy link

zarifpour commented Mar 5, 2024

this might be crazy but... how about dragging the vertical scrollbar to the left to reveal, expand, and transform the scrollbar into a minimap. then when dragging it back to the right it collapses into the scrollbar as it is now.

after all, the minimap is just one big detailed scrollbar, isn't it?

@Moshyfawn
Copy link
Member

I can't remember the specific software that had a similar type of interaction, but I think this is a great idea!

P.S. Was it YouTube's timeline scrubbing that allowed for a more precise time selection when dragging up, that I'm thinking about?

@joshuataylor
Copy link
Contributor

Sorry to add to this, but a bit of context from other IDEs where this isn't the default:

One of the top 50 (~#32) plugins for IntelliJ/Jetbrains IDEs is Code Glance Pro, which adds this - just for some context for some massive "grain of salt" numbers.

@matthieuHenocque
Copy link

@Congyuwang

The // MARK: was just added to the March 2024 version of VSCode, as well as foldable //#region //#endregion

https://code.visualstudio.com/updates/v1_88

Zed's Search buffer symbol doesn't work in JavaScript Object, making it useless in JavaScript modules.

@tensei
Copy link

tensei commented Apr 15, 2024

As a person with a disability who can only use a mouse (left and right click only), I rely heavily on the minimap in Visual Studio Code to scroll. It would be extremely helpful to have a similar feature in Zed as well.

@mocenigo
Copy link

FWIW, I am strongly against this 👎

But it is optional. You do not have to use it if it is implemented!

@mocenigo
Copy link

yeah, minimaps sux, minimap like features in scroll bar, awesome use of space

On Jul 14 2022, at 8:56 pm, Alex Viscreanu @.***> wrote: oh, hold up, that's something different... that's the scrollbar itself, which I have butchered with custom css 🤣 yep, this is what I know from intellij based editors, but I wasn't aware vscode also had it I turned off scrollbars looong time ago 😅 yeah, this is definitely more useful 👍🏻 — Reply to this email directly, view it on GitHub (https:/zed-industries/feedback/issues/263#issuecomment-1184841051), or unsubscribe (https:/notifications/unsubscribe-auth/ATXWUNQC3EHVLBCD3R4KLU3VUBWF5ANCNFSM53CW47CQ). You are receiving this because you were mentioned.

Again, it is personal. An editor should support it, because some people can jump to pieces of code just remembering the "shape", for instance. The users that do not want to use it need not activate it, and it would not be forced upon them.

@sleetdrop
Copy link

Besides xcode, the code reading tool SourceInsight 4 also implemented a minimap with helpful navigation functionalities.
https://www.sourceinsight.com/doc/v4/userguide/Manual/Window_Tour/The_Overview_Scroller.htm

@antoniobrandao
Copy link

antoniobrandao commented May 2, 2024

// MARK:

@matthieuHenocque I love this! I used to create these large labels manually using ASCII generators. This is way more convenient.

@khanakia
Copy link

khanakia commented May 3, 2024

is there a way to enable minimap in zed

@danremollino
Copy link

Would love to have this. I frequently have longer stylesheets that I add ascii banners to for quick reference.

Would be even better if I could disable the default vertical scrollbar and use a minimap instead.

minimap

@tjkohli
Copy link

tjkohli commented Jun 25, 2024

+1 on this request. It really helps to scan & pinpoint getting to the correct code section especially in longer files.

@gabrielcosi

This comment was marked as spam.

@ElhamAryanpur
Copy link

I would really love this as well, it helps get birdeye view of the code and locate blocks easily. +1

@insunaa
Copy link

insunaa commented Jul 11, 2024

A minimap is also useful when you have a multi-monitor setup and need to do a big jump-scroll. Currently with zed it's a fight to even hit the tiny scroll-bar handle when your document is a few thousand lines of code. 4px high and 10px wide on a 1440p monitor and if you miss it you either mark random stuff in your document, click into another application on your other monitor, jump to a random location in code or if you're truly unlucky hit the window resizer.

@pyromaniac
Copy link

I'm all for the minimap addition, this is an essential tool and helps a lot with code navigation and understanding. Please consider implementing it.

@jakobwildrain-si
Copy link

Is there a way to write it as an extension?
I love Zed and minimap is the only feature that I'm REALLY missing.

I would learn Rust to be able to write a minimap for Zed, but I don't think the way I would implement it would work for other people, so I'd rather write it as an extension, so if people don't like it they can pick another implementation of it.

@joseduartesi

This comment was marked as spam.

@s-m-e
Copy link

s-m-e commented Jul 23, 2024

For many reasons stated above (for me navigating large quantities of code, seeing where marked words and symbols show up, where text got replaced, where linters show issues etc) I am really missing this feature. It has been a great help to me in past. A GPU-accelerated map would open the door to a ton of cool use cases. If not implemented, I'd say it's a missed opportunity folks.

@Felipe-9
Copy link

I also use the #MARK and ascii banners features extensively on my documents, its very present on my workflow and i miss it very much.

@matthieuHenocque
Copy link

Came back here to share a bit of personal experience where the Minimap has been incredibly useful with the hope it will convince the Zed team to implement it.

We recently adopted Airbnb coding style at my company so I had to refactor huge JavaScript controllers from a legacy codebase. I used the Minimap's holistic point of view to evaluate the time needed to solve all of the linter's errors and warnings.

Regarding linters errors, it would be nice if there was a visual indicator of errors for things that are missing (like a semicolon) in the buffer. Just sayin'.

@mocenigo
Copy link

The argument is simple: Minimap is such a common feature nowadays — there are even some editors running in a terminal with a minimap — that it is simply needed to guarantee an editor’s wide adoption. And one of zed’s goals is to be widely adopted.

This, and the ability to expose commands and command sequences in sidebar lists (like VScode), and two way sync with SyncTeX.

The latter could be achieved with proper scripting. Or a wider API, which then could be used by the extensions.

@gnat

This comment was marked as off-topic.

@nirui

This comment was marked as off-topic.

@mocenigo

This comment was marked as off-topic.

@zed-industries zed-industries locked as spam and limited conversation to collaborators Aug 19, 2024
@SomeoneToIgnore
Copy link
Contributor

SomeoneToIgnore commented Aug 19, 2024

There's 43 participants that get useless flood of e-mail and other notifications due to the new postings, hence I've locked the issue and urge people interested in the feature to submit PRs on the topic instead of all this above.

Unfortunately, GH will prevent adding 👍 emojis for this too, but it's quite clear that the feature is wanted and in demand, it's just someone has to get the time to implement it.

I am not sure exactly how to implement this, but feel that all the bits are ready.
Here's the path I'd try:

  • if ones opens any editor and zooms out to the end (e.g. by holding cmd-- on mac), there will appear something that looks like a mini map already:

image

  • gpui allows absolute positioning of elements and various overflows, so we can take the buffer and wrap it into a new editor, enforce "max zoom out" property for it and absolute position it over everything in the top right corner modulo header and other menus above.
    It feels that scrollbar and minimap should start at the same point above, and maybe even be of the same length?

  • we might need to somehow ensure it's semi-transparent but it's not very needed for the first prototype if the whole minimap is disabled by default and can be enabled with a setting.
    We should also make that new editor read-only, disable copilot suggestions, etc. and follow events of the "original" editor — so we can reflect selections and, maybe later, visible area border display.

  • Also, we need to override click event handlers to scroll the original editor (and the minimap editor) if the minimap editor is clicked, same way the scrollbar does it.

  • Click through it and otherwise use it to ensure that it works normally and submit a PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
design [core label] enhancement [core label] potential extension Functionality that could be implemented as an extension (consider moving to community extensions)
Projects
None yet
Development

No branches or pull requests