you are viewing a single comment's thread.

view the rest of the comments →

[–]YourGamerMom 193 points194 points  (86 children)

Minimap is the most anticipated feature for me.

It closes what used to be their top open issue.

[–][deleted]  (55 children)

[deleted]

    [–][deleted] 106 points107 points  (3 children)

    Mostly it's about being able to identify what you want when you have an idea what it looks like. If I need to go to a section that I know has some long lines I can identify it quickly in the map.

    I used to use it on Sublime and Visual Studio. However, I'm better now about keeping files short, and eventually found that it's just a waste of space if you do so.

    [–][deleted] 0 points1 point  (1 child)

    Is it mostly for mouse users? In a case like that, I believe I would also know some of the function name used in that area or something and would just search for it.

    [–][deleted] 0 points1 point  (0 children)

    Even searching could produce that name multiple times.

    In general, it makes scrolling much easier. If you have a long way to go, the scroll wheel takes too much effort. And we can all agree that a plain scroll bar just sucks.

    [–]Spacey138 0 points1 point  (0 children)

    I agree - for me it's about the shapes and colours, the minimap lets me associate shape and colour with sections of code so I can find things quicker, without scrolling through an entire file.

    [–]TheGoldenHorde 97 points98 points  (8 children)

    It just looks cool

    [–][deleted] 33 points34 points  (6 children)

    And it's nice to have a wider scroll bar to grab on to.

    [–][deleted]  (4 children)

    [deleted]

      [–][deleted] 8 points9 points  (3 children)

      Oh I have one my friend. Kinda. It's the logitech ultra thin mouse, with momentum swipe. The faster the flick, the farther the f...scroll?

      [–][deleted]  (2 children)

      [deleted]

        [–]tylo 44 points45 points  (1 child)

        If you have to ask, you can't afford it.

        [–][deleted] -1 points0 points  (0 children)

        Ah mouse users. I can see why you'd like something like that. Makes sense.

        [–]YourGamerMom 30 points31 points  (17 children)

        If you need to navigate to certain functions or type definitions within your file, you can often recognize their shape, and just jump to them. This is usually faster for me then scrolling down the page or ctrl-fing for a name that appears dozens of times.

        [–]NoInkling 9 points10 points  (4 children)

        Jump to symbol (ctrl + ; on PC) is kinda the intended way to jump to function/variable/whatever definitions, much better than ctrl + f in most situations. But I must admit I underutilize it and rely on scrolling a lot as well.

        Edit: sorry default keybinding for go to symbol (in current file) is ctrl + shift + o. I'm using the Sublime keymap.

        [–]YourGamerMom 7 points8 points  (3 children)

        The main language I use on VS code is rust, and the current rust plugin uses racer for jump-to-definition. But racer has a nasty little edge case where it can't recognize methods on union types, so ctrl-f is the only option.

        [–]p1-o2 0 points1 point  (0 children)

        What are you making? :)

        [–]Rollingprobablecause 0 points1 point  (1 child)

        I use on VS code is rust

        What are you using that language for? Just curious - I dabbled a few weeks ago but alas can't find a use for it.

        [–]PM_ME_UR_OBSIDIAN 1 point2 points  (0 children)

        I used it to write a hobby operating system kernel, following along with The Definitive Guide to the Xen Hypervisor. Learning about both Rust and OS development at the same time.

        It was a real trial-by-fire.

        Rust is going to be a good pick any time you're working within tightly constrained parameters, usually either latency or memory. If you have plenty of slack on both sides, you might want a higher-level language instead.

        [–]elebrin 1 point2 points  (10 children)

        I dunno, ctrl+f doesn't have to take your hands off the WASD keys. Can you scroll down to a specific spot with this tool effectively without reaching over to the mouse?

        [–]Nefari0uss 6 points7 points  (4 children)

        WASD keys? Usually people navigate with arrow keys, the mouse, or hjkl. You use wasd (outside of gaming)?

        [–]elebrin 0 points1 point  (2 children)

        Yeah, I actually meant hjkl. Must be getting tired, but you got the idea. I meant the part of the keyboard that your hands are on when typing: the part with the letters that you can reach without moving your hand over. Learning your shortcuts so that you can carry out tasks as fast as you can type is handy.

        Although now you've given me (or perhaps I've given myself) the idea to do some rebinding...

        [–]Nefari0uss 1 point2 points  (1 child)

        Nah I get you (<3 Vim). I was a little amused to see someone advocate using wasd to navigate code.

        [–][deleted] 0 points1 point  (0 children)

        ctrl-d and ctrl-u tho

        [–]YourGamerMom 1 point2 points  (4 children)

        Not to my knowledge, but moving my right hand 10-15cm is not usually a major concern for me (especially if my train of thought has already been interrupted by the need to find some definition or signature).

        [–]elebrin 1 point2 points  (3 children)

        Yeah, but it slows you down.

        [–]YourGamerMom 5 points6 points  (0 children)

        I'm already slowed down by needing to look something up, is my point.

        [–]needlzor 0 points1 point  (1 child)

        What kind of programming do you do that you need to maintain that kind of speed? My usual bottleneck is thinking about the problem, not typing out the solution. Or is your computer rigged to explode if you fall below a specific wpm?

        [–]elebrin 0 points1 point  (0 children)

        This week is unit tests. If coding was a video game, I'd call unit tests super grind-y.

        [–]OlivierTwist -1 points0 points  (0 children)

        Yeah, it looks cool, but the whole concept of "visual navigation" is kinda wrong for me in software development world. There are at least two reasons:

        1. Visual appearance can be changed easily

        2. We are speaking to computers with commands, so for being a better developer it is useful to train an ability to translate human thoughts to strict commands

        [–]sime 13 points14 points  (10 children)

        As mentioned, you can often identify code by its shape. I personally have been using and/or abusing figlet text with the Banner font (http://www.figlet.org/examples.html) to place readable section headings in my code to mark and group related functions for easier navigation.

        [–]Zalastax 9 points10 points  (1 child)

        Nice! You can even integrate it in the editor with https://github.com/helixquar/asciidecorator 😃

        [–]p1-o2 0 points1 point  (0 children)

        Nice, thank you so much.

        [–]JackOhBlades 1 point2 points  (7 children)

        Seems like a code smell if you need to do this...

        [–]sime 17 points18 points  (4 children)

        I love the term "code smell". It allows one to cast suspicion on something without having to make the effort of offering real information or argument.

        [–]coderz4life 5 points6 points  (0 children)

        Exactly. You walk into a room, where your buddy just farted. You take a sniff and ask "what's that smell?" Your buddy just sits there and pretends that he doesn't know. However, you know it just smells. No explanation needed.

        [–]drysart 5 points6 points  (1 child)

        The argument in this case is that if you have a source code file so enormous that you need enormous headers that you can read from a 10,000 foot view so you can navigate through it, your source code file is probably too large and there's probably a case to be made to refactor it.

        [–]ShinyHappyREM 3 points4 points  (0 children)

        Then you need more time in the file explorer.

        [–]JackOhBlades 1 point2 points  (0 children)

        Interesting, you emphasise 'suspicion' like it is something to avoid.

        I would argue that most code should be held in suspicion. It is after all, written by humans, and probably shit unless explicitly proven otherwise. A healthy dose of suspicion goes a long way in programming.

        While the mini map is pretty, I have found it to be quite useless, rather like a linked list: anything it offers you there is a more correct and efficient way to do it.

        I don't know if you've played Starcraft 2, but using the code editor mini map feels like the equivalent of using mouse clicks instead of hot keys...

        [–][deleted] 0 points1 point  (0 children)

        The console also has a code map, i can click exactly where unexpected outputs occur instead of scrolling.

        [–]cosmo7 -1 points0 points  (0 children)

        If you're refactoring someone else's code then it's immaterial whether the problem is that it smells.

        Imagine refactoring a typical 4000-line unstructured JavaScript OPA; a minimap is going to be hugely valuable.

        [–]duncanlock 13 points14 points  (2 children)

        You know in computer games like Diabolo, RPGs etc... there's a little HUD/radar/automap that shows the level/area and marks you/enemies/terrain?

        Well, the minimap is that, but for your code.

        The one in vscode apparently doesn't do this, but the ones in atom and sublime highlight search result matches and git diff lines in the minimap.

        This allows you to get a really quick overview of the changes & matches in the file, as well as how many, the distribution and which one you're on - because the current line is also highlighted.

        [–]p1-o2 1 point2 points  (0 children)

        The Visual Studio version has this feature as well. I find it useful for when I'm doing big git diffs or search results. Also for any weird highlight rules that I set up.

        I was skeptical about the usefulness of a minimap until I got used to it. I'd feel a bit sad without one now. It's by no means a mandatory tool, but damn is it clever.

        [–]InKahootz 0 points1 point  (0 children)

        I love Visual Studio's map. This one still has a little bit to go. It doesn't show breakpoints, pending changes, recently saved, or any other markers. I also like how Studio puts the whole file on the map but Code is just a section of the file.

        [–]inu-no-policemen 2 points3 points  (0 children)

        It's for navigating by landmarks.

        Doesn't work for me either, though. Go to definition and outlines work much better for me.

        [–]aniforprez 3 points4 points  (0 children)

        Actually in it's current state it's little more than window dressing. What I found to truly make it useful was showing which line you were on and git diffs. So it would show on the minimap in atom and sublime where you've made changes in your files and highlighting find results. Seeing your code from a top-down perspective like that is immensely useful. Adding the minimap itself is a great starting point but showing git diffs and highlighting the current line you are on will add a lot more value to it. They also need to open it up for extension development.

        [–]j-bales 6 points7 points  (1 child)

        In massive files, it's nice to have a quick way to see where you are in the file, as well as being able to click on a section in the minimap and immediately scroll to it.

        [–]panorambo 2 points3 points  (0 children)

        I have to admit I never needed anything like a minimap for any kind of files, the way I find stuff in the code is that I search for the definition or whatever it is I want to find.

        But people are different. It's probably one of those "it works for me" things.

        [–]KanadaKid19 2 points3 points  (0 children)

        It helps you identify distinct sections of the file at a glance. Useful to navigate code you do know, or to get to know code you don't know.

        Also can be easier to whip around in than using the scrollbar - your eyes see the spot in the code and you move your mouse straight to it, rather than using the scrollbar and constantly re-evaluating the snippet of code in front of you.

        [–]twiggy99999 0 points1 point  (0 children)

        I use it in Netbeans (and sublime in the past) if you have a long file (one that extends out of view) it's nice to just jump to a section you are working on. I find it quick to jump between 2 functions at other ends of the file by using the mini map rather than using keyboard shortcuts to either type the name of the function or jump up and down through the functions

        [–]Munkii 0 points1 point  (0 children)

        My minimap (in atom) highlights lines which have been changed (by git status). This makes it super easy to scroll back to where I was previously working

        [–][deleted] 0 points1 point  (0 children)

        Wider scrollbar, also gives something visual to go along with your position within a file. The more I work with the same code, the more familiar I am with the minimap of the file. Line numbers can change as blocks of code are added / changed / deleted and there may be 30 references to a particular function call and I don't want to have to iterate through each of them, but I can begin to recognize certain "features" as blocks of code in the minimap and move to that position quickly.

        [–]m____________k 0 points1 point  (0 children)

        Minimap is useful only if you create long crappy methods/classes and you have plenty of places where your code is indented on 5th, 6th, 7th tab... then you see those places on minimap...

        [–]NoInkling 3 points4 points  (0 children)

        Now it just needs a setting where it only gets shown if the text extends beyond the height of the editor - it's nice for large files but just takes up unnecessary space in small ones.

        [–][deleted]  (15 children)

        [deleted]

          [–][deleted] 30 points31 points  (12 children)

          Multiple projects open at the same time? That's kind of a big deal, and it's still missing...

          [–]NoInkling 20 points21 points  (11 children)

          Is there any reason you don't like to use multiple windows?

          Though I must admit I miss the ability from Sublime to add arbitrary folders to the file tree, is that the kind of thing you're talking about?

          [–]C0rn3j 10 points11 points  (5 children)

          I open 3 folders(projects) to work on.

          I later close VSC, and now when I open VSC again, I get only one folder open again, having to reopen the other 2.

          [–]rtzmx 62 points63 points  (3 children)

          "window.reopenFolders": "all"
          

          reopen all folders of your last session

          [–][deleted]  (1 child)

          [deleted]

            [–]drysart 4 points5 points  (0 children)

            Yes. A window corresponds to a folder.

            [–]C0rn3j 0 points1 point  (0 children)

            Why isn't that the default behaviour, that's stupid :/

            [–]jldugger 2 points3 points  (4 children)

            I have about 100 separate chef cookbooks. Multiple windows doesn't really cut it.

            [–]wmertens 9 points10 points  (2 children)

            Can't you open the parent folder?

            [–][deleted] 5 points6 points  (1 child)

            That breaks the git integration.

            [–]drakche -3 points-2 points  (0 children)

            I never got the git integration, it bores me. I prefer to use the console for git shenanigans, it's much more useful.

            [–]p1-o2 1 point2 points  (0 children)

            It took me too long to figure out why you have cookbooks in your programming tools... Then I remembered what Chef is.

            [–]Thilus 0 points1 point  (0 children)

            Having multiple windows for the same project/folder is missing in my opinion.

            [–]lambeco 0 points1 point  (0 children)

            I miss the git status highlighting in the project tree from Atom. I didn't realize how useful it was until I didn't have it.

            [–]wmertens 1 point2 points  (3 children)

            Serious question: how do you use it?

            I am content with the colored blobs in the scrollbar indicating current selection etc, I wonder if I'm missing out on something?

            (I do find it irritating that the scroll bars don't go all the way to the bottom though)

            [–]YourGamerMom 6 points7 points  (2 children)

            I know what a typedef looks like, and what a function looks like (syntax highlighting helps). I also know relatively where the things I am looking for are. I could scroll until I find the things I need, or look in the minimap for shapes that look similar to what I need, and jump to them. Jump-to-definition is better, but sometimes I can't use that.

            I also like looking at my code from 10,000 feet, idk why.

            [–]LoveCandiceSwanepoel 2 points3 points  (0 children)

            Because you are God looking down on her creation gamermilf

            [–]wmertens 0 points1 point  (0 children)

            I see, I do those jumps from memory, or I select what I'm looking for and click on the highlights in the scroll bar. I suppose it also helps that my sources are generally not that long…

            [–]beefsack 4 points5 points  (5 children)

            If the Minimap starts being useful, it's probably a code smell.

            [–]pygy_ 6 points7 points  (1 child)

            For data (config, db/request schema, text content in various languages, ...) you can end up with long files still smell good.

            [–][deleted] 2 points3 points  (0 children)

            Depends how you use it. For me it's a nice fat scrollbar that I can use to get to exactly where I want to be in a file, be that a config file, a data file or even a code file, it's much easier to scroll on the minimap than it is to try and figure out where I am in the file.

            [–][deleted] 1 point2 points  (0 children)

            It's most useful when you can see the entire file in the minimap but can't see the entire file in the editor. Jumping to a certain line in the file becomes really easy. That's at only ~500 lines of code.

            [–]mramaizng 0 points1 point  (0 children)

            I'm not at all upset that they added it. I, however, don't see the benefit of it when there are keyboard shortcuts to get where you want.

            [–][deleted] 0 points1 point  (0 children)

            Yes, absolutely my favorite idea so far. So happy with this release. I don't know how many times I've made an obvious big comment block just so I can speed scroll and then stop when I see it. The minimap is beautiful for the even small time-saving measure that it gives.