zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.87k stars 2.68k forks source link

Minimap #5308

Open JosephTLyons opened 2 years ago

exalted commented 2 years ago

FWIW, I am strongly against this 👎

aexvir commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

heres a little pic, just opened up a .bashrc and searched for an = sign, and you can see in the scrollbar there are all lines showing.

On Jul 14 2022, at 8:22 pm, Alex Viscreanu @.***> wrote:

@scott-ling (https://github.com/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 😆

— Reply to this email directly, view it on GitHub (https://github.com/zed-industries/feedback/issues/263#issuecomment-1184812013), or unsubscribe (https://github.com/notifications/unsubscribe-auth/ATXWUNSP5KMPNUACILT3CSLVUBSGTANCNFSM53CW47CQ). You are receiving this because you were mentioned.

aexvir commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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://github.com/zed-industries/feedback/issues/263#issuecomment-1184841051), or unsubscribe (https://github.com/notifications/unsubscribe-auth/ATXWUNQC3EHVLBCD3R4KLU3VUBWF5ANCNFSM53CW47CQ). You are receiving this because you were mentioned.

JosephTLyons commented 2 years ago

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.

uicowboy commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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

arguiot commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Here's the alternative Display hunks/diagnostics/search results in scroll bar that I'm personally looking forward to and kind of mentioned here https://github.com/zed-industries/zed/issues/5308 Let's 👍🏽 it up.

JosephTLyons commented 1 year ago

Here's the alternative Display hunks/diagnostics/search results in scroll bar that I'm personally looking forward to and kind of mentioned here https://github.com/zed-industries/zed/issues/5308

Let's 👍🏽 it up.

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

diocletiann commented 1 year ago

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").

Congyuwang commented 1 year ago

Xcode has one of the most useful minimap I've ever used:

You can use // MARK: - XXX to add section header, which will be displayed in the minimap, making it super easy to navigate around:

截圖 2023-09-06 13 53 58

Putting the mouse over the minimap shows the name of the function the user is pointing at:

截圖 2023-09-06 13 56 13
aranw commented 11 months ago

I think one of the most useful features of the minimap that I'm missing in Zed is the ability to quickly see where symbols are being used

Screenshot 2023-09-26 at 09 27 38

Edit: must admit with my current theme it is not the easiest to see. Be good if anyone has any recommendations for alternatives 😁

fxsalazar commented 11 months ago

Is not only about the theme, but having it in the scrollbar too...

stonkol commented 7 months ago

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.

For sure, that is a clever solution I would like to see in Zed.

normal-user-2 commented 7 months ago

Stopped using Zed only for these, these are killer features for me.

  1. Showing red/yellow lines for errors/warnings throughout the entire file (through minimap)
  2. Showing the filename's text color in red for errors/warnings throughout project explorer

These 2 options are very useful to find out the errors quickly, in stead of going to compiler.

I am hopeful to get back to Zed as soon as these 2 are in place. Enabling the notifications for this issue.

antoniobrandao commented 7 months ago

The minimap allows a faster scroll experience. Not only it is thicker than the scroolbar, but I can scroll half way through a long file in one mouse swipe.

As I code a file, I have a sense of what is in it. The minimap is a zoomed-out view that allows a particular type of navigation. I often click somewhere in the minimap to jump instantly to a section of the file, and I know that is the right place because I see the shape of the code in the minimap.

It also helps me a lot with other things such as

I'm trying Zed today and I'm liking it. Hopefully this feature will arrive soon

antoniobrandao commented 7 months ago

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

I think it only makes sense to render blocks. The text is never readable anyway. Blocks will always be more clear to the eye.

nicholas-ochoa commented 7 months ago

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:

https://github.com/zed-industries/zed/assets/126299/2a272681-64ec-4384-bfaa-cbef186ff2a6

nazmul-pro commented 7 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 5 months ago

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 commented 5 months ago

@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 commented 5 months ago

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 commented 4 months ago

FWIW, I am strongly against this 👎

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

mocenigo commented 4 months ago

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://github.com/zed-industries/feedback/issues/263#issuecomment-1184841051), or unsubscribe (https://github.com/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 commented 4 months ago

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 commented 4 months ago

// MARK:

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

khanakia commented 4 months ago

is there a way to enable minimap in zed

danremollino commented 3 months ago

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 commented 2 months ago

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

gabrielcosi commented 2 months ago

+1

ElhamAryanpur commented 2 months ago

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

insunaa commented 2 months ago

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 commented 2 months ago

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.