4 ms·
I don't understand why every editor these days come with a minimap, and many of them turn it on by default. I know Sublime introduced it but what does it do exa
by wyuenho 5y ago
I don't understand why every editor these days come with a minimap, and many of them turn it on by default. I know Sublime introduced it but what does it do exactly? Why is everyone copying it? It just shows you the shapes of blocks of texts of a long file from ten meters away. It doesn't tell you what they are or what they do, or even how to get there. Every IDE since at least the early 2000s gave you an index or a tree menu or something for navigation, VS Code has a breadcrumb IN ADDITION TO the minimap, possibly because Microsoft realizes its gimmick nature. Why not just get rid of it to free up more screen real estate for actually useful things?
- bjt 5y agoIt can be very useful when the work you're doing requires jumping between 2-3 different parts of a file. Yes, you can probably do the same with ctrl-f, but for many people it's more intuitive to have the visual representation.
- wyuenho 5y agoThings like jump to definition and references exist for this reason.
- mholt 5y agoWith my workflows, I really don't need that inch of my editor. The minimap is useful because it lets me instantly go anywhere in the file using visual cues. Some minimaps show you details when you hover or click and drag. Anyway, I have a hard time being productive without it.
- mfext 5y agoIts mostly useful to me if I’m scanning a longer file for merge conflicts. By clicking the minimap I can get to an error easily enough. It’s also a literal bird’s eye view when I’m reverse engineering something. YMMV
- hiyer 5y agoI've found minimaps to be useful when you're also using linters or compilers - you can quickly jump to the next error by looking at the little red dots or lines on the minimap.
- jhatemyjob 5y agoIn xcode if you put your mouse over a function it highlights the function, and puts a tooltip with its name next to your mouse. It's sometimes useful to quickly see what a given class contains and see how complicated it is (based on lines of code and number of indentations). You could argue it's highly situational, but IMO it's nice to always be able to see how complicated your codebase is getting, tech debt is no joke
- 1123581321 5y agoOver time you learn what the various shapes in the minimap represent. It helps you generate an intuitive awareness of your location and what kind of content or data precedes and follows it--which in turn gives you more of an idea of what you're currently looking at.
- wyuenho 5y agoYou don't edit more than one file? Why would the shape meanings in one file carry over to another? Generally, the only signal that may carry over is the indentation levels. For the intuitive sense you speak of to develop, your file structures have to be highly regular across the board. TBH, I haven't even seen conventional Ruby on Rails code bases that can give me that.
- 1123581321 5y agoSome shapes do carry over, e.g. in SQL dumps for certain types of applications. Spending a lot of time in one file, e.g., a large Rails controller, also confers the benefit. These are just two examples. Overall I would say that trying to notice and measure the effect isn't productive. It's just a bit of extra context I realized in retrospect.
- marcosdumay 5y agoYou are bothered by useless... Why did every new editor adopt the Visual Studio asinine default of fuzzy autocompleting (not only the new part) on enter or space? It's a stupid idea, with absolutely no upsides. I didn't try this one (I'm not on a mac), but I fully expect it to do that too. All of them do. (I'll be glad if somebody tells me it doesn't.)
- eyelidlessness 5y agoI thought I hated the minimap, but it turns out it was just too … large. The same signals I get from it can be compressed into the width of the scrollbar, and I find them incredibly useful. Navigating problems is either very mouse-heavy in a very mouse target dense area, or requires learning more non-standard keyboard shortcuts/chords, or just “click near the part of the scrollbar where the colors look wrong”. And it takes no additional screen real estate at all. (Which I’m not trying to conserve for pixel density, I run a comically large screen daily; but I try to keep things smaller to stay focused)
- KrishnaShripad 5y ago> Why not just get rid of it to free up more screen real estate for actually useful things? Like? I have an 80 column width by default. To not let my code run the entire length of screen for obvious reasons. Also, it is code smell IMHO if you have to write that much code in a single line. > I know Sublime introduced it but what does it do exactly? Why is everyone copying it? It just shows you the shapes of blocks of texts of a long file from ten meters away Visual cues. I can immediately know if my linter finds something wrong. It highlights it in red. Without a minimap I'll have to scroll (or if you are using vim you would still need to ctrl+D till you find the problematic line). If I am editing a Git repo, I can easily make out the additions/removals in the file. Additions in green and removals in red. > VS Code has a breadcrumb IN ADDITION TO the minimap, possibly because Microsoft realizes its gimmick nature I sometimes hide my Sidebar in vscode while working in Zen mode. I can then access the directory structure through the breadcrumbs. Especially useful when I don't remember the name of the file ahead of time to use it in command palette search. Clicking on the filename in the breadcrumb gives me access to all the symbols defined within the file. Quick way to navigate between declared top-level variables/functions.
- tlamponi 5y agoI definitively do not want to critique your workflow, that would be pretty dumb by me, just two comments to your points that I don't agree with in full. > Like? I have an 80 column width by default. To not let my code run the entire length of the screen for obvious reasons. Also, it is code smell IMHO if you have to write that much of code in a single line. What about a split view? I'd be far less productive if my screen wouldn't have space for 4 split view's for >> 80 columns in my editor + a small terminal split by terminal multiplexer. > Visual cues. I can immediately know if my linter finds something wrong. Hmm, while there are a few things like renames of variables/functions/... or (type) signature changes for that to happen outside the view one is currently editing in, it's only solving part of the problem — as other files can have those issues too and require changes, so one needs to run a check/lint test or build anyway.
- KrishnaShripad 5y ago> What about a split view? I'd be far less productive if my screen wouldn't have space for 4 split view's for >> 80 columns in my editor + a small terminal split by terminal multiplexer. This includes using split views. Of course I have to mention that I use Mac as my primary development machine (which comes with 5K retina display). So already have plenty of real estate. It might be an issue on laptops. But I haven't tried it to give feedback on that. I just gave my personal anecdote. > so one needs to run a check/lint test or build anyway If your entire team is already using lint from the start you wouldn't have to worry about it. Even if not, you would have typically run the linter when you cloned the repo. The build process should have lint as a pre-step anyways. So the chances of you having non linted files elsewhere is minimal. And when you rename functions/variables you can rename as symbol, which will change it in all files that reference it. If you have the right workflow setup you wouldn't have to worry about other files being affected.
- deleted 5y ago[deleted]
- arvinsim 5y agoTrue. I rather prefer the Structure Tab that Jetbrains IDEs have. That one is more useful to me.
- thiht 5y agoCame here to say this. In VSCode there’s the Outline panel that does the same thing. I find it incredibly more useful than the minimal. But hey, to each their own, I just disable the minimal and that’s it.
- jonwinstanley 5y agoI tried to work without it for a while but found I needed it for skipping to specific areas of long, familiar documents
- eu 5y agoAgree. This is one of the 1st thing I fix when configuring an IDE.
- wakeupcall 5y agoThe minimap does help in passively locating where things are in a file, as "this is before/after this". It also gives a signature of which file you're editing just by glancing at the shape. Not only the position in a source file is relevant for many languages, but if you're jumping to references/definitions blindly from another source, you can tell which source file it is and where you are in a single shot without looking at the rest. That being said, I don't use the minimap. I did try to use it though to see what's the fuss around it. For me it takes too much horizontal space. I can have another vertical split pane instead of having minimaps showing. Heck, I'm not even using scrollbars. Having an indicator of which function your cursor is currently inside provides very similar benefits to me. Not as immediate as a minimap I have to say, but more useful if you take the time to read it. This is a tradeoff people will argue on forever.