Visual Studio Code



  • Playng in the Windows version. Nice so far. More later..

    But in the meantime, tried to unpack Linux version.
    Comes in a zip.

    :wtf:?

    Should have been suspicious.

    But instead...

    cd /opt
    unzip VSCode-linux-x64.zip
    

    NO FUCKING DIR INSIDE ZIP

    THOUSAND LITTLE FILES ALL OVER MY OPT

    WTF MICROSOFT! WHAT ARE WE, ANIMALS!?



  • Your zip program doesn't handle that? You are an animal.



  • Moral of the story: never unzip a zip without looking inside.

    Alternatively, just make a directory and unzip inside that and if it ends up being done right (which zip files never are) move the directory up.



  • True story: I broke a productive app once while doing that. It stopped ALL the truck deliveries on their tracks for an hour or two.

    I didn't get fired but I learned an incredible important lesson: NEVER EVER UNZIP/UNTAR STUFF WITHOUT MAKING A SEPARATE DIRECTORY FIRST



  • Bet you wish you had a CLI "undo" command about now.


  • Discourse touched me in a no-no place

    @Magus said:

    Man, these reporters are quite incredible.

    They probably are, but what's actually incredible is their credulity.



  • I wish the fucking computer did what I wanted it to do, not what I told it!


  • area_pol

    I wonder how they make a zip that can be opened by unzip but cannot be decompressed by fileroller...


  • ♿ (Parody)

    @dkf said:

    Nah, they're just as bad as the gaming press, just with more suits.

    Gell-Man amnesia all over again.



  • Getting this to integrate with linux:

    ####1. Unpack the zip somewhere under /opt
    ###HAVING MADE SURE YOU CREATED A DIRECTORY FIRST
    Eg. /opt/VSCode

    ####2. Create a desktop file

    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=VSCode
    Comment=Microsoft Visual Studio Code
    Exec=/opt/VSCode/Code $@
    Icon=/opt/VSCode/resources/app/vso.png
    Path=
    Terminal=false
    StartupNotify=false
    

    Save it under /usr/share/applications/VSCode.desktop (in my case). Then add it to app menu / desktop / wherever, using standard methods.

    ####3. Create a command line launcher
    Of course, MS has no idea about CLI. The executable doesn't have any --help output. It also won't accept path to a file that doesn't exist yet. Also has a nasty habit of remaining attached to whatever shell started it, thus spewing its output garbage into your terminal.

    So, do this:

    [[ ! -z $1 ]] && touch "$1"
    /opt/VSCode/Code $@ > /dev/null 2>&1 &
    

    Save under /usr/local/bin/code. Use as code myfile.txt.

    Starting to actually use it now that I got it half-working in *nix.



  • Oh great. Atom shell (or electron, as its called now) is hit with that stupid chromium + VirtualBox bug, where you can't use your mouse.

    Hopefully, they'll update to the fixed chrome soon.



  • So yesterday evening, I created a stupid yeoman test app, and opened it as project in VSCode. Now I'm about to do some real work and want this project gone.

    Ok.... so.... what now? There's no close project. There's no remove project. You can just sort of minimize it, but the title still says "YoTest".

    So... that's it? This just stays here forever? All my future work will be within YoTest project?

    A-ha. A solution!

    1. File -> New Window
    2. Close the old window

    ...

    Really Microsoft? Really!?



  • It's a fucking alpha. Relax. Sheesh.



  • I'm on Windows 7 here, so no Start Screen.

    Having said that, I did check the Start Menu and there's no icon there for it. Tried looking manually and using the search box.

    This is also on a system that already has 3 versions of Visual Studio installed if that makes a difference (which I doubt).



  • So, I just edited a complicated SQL function in both VSCode and sublime. This was purely editor vs editor battle, with neither having any great intellisense or semantic understanding of the code (eg. they have no idea LOOP..END LOOP is a block, stuff like that).

    Editor vs editor, VSCode is clearly inferior, even though the amount of features and polish is amazing for the initial alpha release. The biggest missing features:

    • Code folding (mentioned by @Onyx)
    • Various select next/prev occurrence options from sublime (the one I use is Ctrl + D).
    • Find All (creating a multi-cursor)

    It does have vertical cursor, which works almost the same is in sublime. Also, the ever-present command palette. We have yet to see if MS will be able to get any kind of module ecosystem going.

    Performance wise, these are the approximate startup times:

    VSCode, Linux VM: 5s
    Sublime, Linux VM: 1s

    VSCode, Windows: ~3s
    Sublime, Windows: <1s

    During text editing in a Linux VM, VSCode seemed just a tad choppier than sublime. But unlike atom, it's below my annoyance limit. I can work with this. Perhaps atom platform has improved in the meantime?

    So, similar as with atom editor, performance-wise and feature-wise, VSCode can't even touch sublime. And probably won't be able at least for a year (presuming sublime-text is a stationary target, which ATM it seems to be).

    But unlike atom edit, VSCode supposedly has some of that intellisense magic MS is famous for. Later today or tomorrow I'll do a small throwaway node.js project and see if intellisense can be VSCode-s saving grace.

    Overall, an impressive first version, but so far, nothing compelling enough to move me off either sublime text or the JetBrains stuff.



  • I think one of the main things they want it to be used for is ASP.NET development, since it apparently packs Roslyn and such.

    Meanwhile, the things they've been saying about Continuum have been rather cool: they removed the need for ifdefs when making UI for tablet/desktop/phone, and made it so you can switch if your screen size changes.



  • @Magus said:

    I think one of the main things they want it to be used for is ASP.NET development, since it apparently packs Roslyn and such.

    That's not interesting for me. If I'm gonna write C# / .NET code, I'll use Visual Studio.

    I never understood their push to improve C# support in text editors.

    "C# debugging in sublime text! In atom! In vim, even!"

    That's not gonna make you cool with the hipster crowd, grandpa.

    They are trying at least, god bless their empty corporate shell of a soul.



  • @cartman82 said:

    That's not interesting for me. If I'm gonna write C# / .NET code, I'll use Visual Studio.

    That's the point. There is no other VS-family tool that works on mac and linux, which can now natively run ASP.NET.



  • Sort of works on OSX, except you need to have an up-to-date Mono installed, otherwise it's error time and no debugging. The editor is quite sucky. So it only offers a better autocompletion and definition finder. That's not going to make me change my favorite editor any time soon.



  • @ben_lubar said:

    Moral of the story: never unzip a zip without looking inside.

    I do this all the time and have never had a problem. 😃

    Of course, I always move the .zip into its own brand new private folder before I unzip. 🐔



  • I'm just so used to 7z and winrar, where you say 'unzip to 'blah'' and it puts it in a folder...


  • BINNED

    Which is great if I already have a folder for it ready and then it creates another one... So I always check what's in it beforehand.



  • 7z also makes it significantly easier to make a .zip with a single folder in it than with the files inside the folder in it.



  • I don't really think right clicking with multiple files selected is harder than with just one, which I buttume it does, but I use folders anyway.



  • Right clicking a file or folder not in your selection sets it as your selection, so one folder is a single right click whereas a bunch of loose files would require you to select them individually first, at minimum ^A.



  • Or shift click, or drag-select... it's not difficult.


  • kills Dumbledore

    Or right click and drag



  • <insert obligatory post about GNOME3 here>


  • BINNED

    @aliceif said:

    ≪insert obligatory postrant about GNOME3 here>

    FTFY

    Also, I had no idea ≪ is an entity. A nonstandard one, apparently, but an entity none the less.



  • A few of the older HTML entities are accepted with any capitalization.


  • BINNED

    But the preview renders it differently than &lt;



  • &lt; <
    &Lt; ≪
    &LT; <
    &lT; &lT;
    

    WTF HTML



  • &lt; Leftenant


  • Discourse touched me in a no-no place

    @Magus said:

    &lt; Leftenant

    &rt; Rightenant



  • So, during the Kipman interview, they got him to say that developing 3D applications for hololens should be similar to doing the same sort of thing for a phone, which is the most detail we've been given...

    Kestrel seems nice enough, though.


  • Discourse touched me in a no-no place

    That'll be handy when I finally get my new Macbook Pro dev machine at work.



  • @Onyx said:

    So it's just an editor, not an IDE?

    That's fine, but couldn't they brand it differently then? This is just confusing naming!

    Confusing naming is Microsoft's speciality! Just be glad they didn't call it "Xbox Visual Studio 10 One".

    Although Google is trying hard too, with their labelling everything as "Chrome" even when it makes no sense, and their moving things in and out of the "Play store" brand, and whatnot.



  • Zips should not have a stupid extra folder inside. Your unzip tool is bad and you should feel bad.



  • @anonymous234 said:

    Zips should not have a stupid extra folder inside. Your unzip tool is bad and you should feel bad.

    Oh, right, forgot to respond to the exploding-zip folk. Fuck off.


    As promised, I'm making a little test app using VSCode in Windows. A few more impressions:

    Markdown support is pretty good

    It has live preview and some basic intellisense. All the github-flavored stuff works. The one thing I'd like to be different is styling in the preview pane. It uses the editor's color scheme instead of a black-on-white styling which is what you'll probably see in reality.

    Oh, and preview doesn't come and go automatically. You have to set it up yourself, and then turn it off once you're done editing markdown.

    Little things are off

    I like to create a new blank file, type in something and press Ctrl+S. Sublime will pre-fill the file name with the text you typed. VSCode doesn't do that. It's the little things like that that I find missing.

    You can say I'm trapped in a sublime workflow. I'd say stuff like this is part of the general polish of a product.

    JSON support is mediocre.

    For example, you'll get the red squiggly line if you leave out quotes, but VSCode won't offer to fix this for you.

    Zero tooling for .gitignore

    WebStorm supports very smart .gitignore editing through a plugin. VSCode treats it as a dumb text file.

    Good support for package.json

    VSCode knows about various keys and version patters, and will help you out. Nice.

    Git support is nice and simple.

    As you change files, they appear here. Click the entries under "CHANGES" to stage them. You also get a nice diff view.

    Type in the commit message above. Click the little check button to commit. That's it, no advanced features that I see. This is fine for the 1.0, though. Very nice git workflow, overall.

    Off to the main course - node.js intellisense.

    Initial impression: underwhelming.

    Turns out, according to this, you need to install the same sort of definition files that provide typing information in typescript. As I mentioned before, that can be a bit... problematic, long-term. Other IDEs, like WebStorm, try to build intellisense info out from actual source files. This is more flexible, but less powerful than customized ts manifests.

    Long term, I expect VSCode to have good intellisense for well-known supported modules and flounder if you try to go off mainstream.

    Installing the definitions is a bit fiddly

    There are two ways to add these definitions to the project

    1. Type some magic nodejs-like string (eg. __dirname) to trigger a special intellisense option and everything is set up for you automatically.
    2. Set up tsd command line utility, search for the appropriate module, install it, add the magical comment header manually.

    There doesn't seem to be anything between the two extremes. Compare this to WebStorm, where you have a menu option to tell it you're making a node.js app, and WebStorm does the rest. This needs more work.

    Once you get this working, it's very nice indeed.

    Look above. The second argument should be something like 'utf8' or 'ascii'. But VSCode has no idea and doesn't correct me. So, there's room for improvement there.

    On the other hand, moving between different method signatures and the general feel of Intellisense is good old Microsoft. The best I've seen in a js editor so far.


    Enough for now. More to come.



  • Unfortunately, javascript intellisense looks like a dud.

    Here's the code:

    #######app/dal.js

    var pg = require('pg');
    
    function DAL(config) {
      var pgConfig = config.pg;
      if (!pgConfig) {
        throw new Error('Pg config must be provided');
      }
    
      // ...
    
      function readItems(callback) {
        return query('SELECT * FROM items', callback);
      }
      this.readItems = readItems;
    }
    
    module.exports = DAL;
    

    #######app.js

    var fs = require('fs'),
    	util = require('util'),
    	fmt = util.format.bind(util),
    	
    	API = require('./app/api'),
    	DAL = require('./app/dal'),
    	initRoutes = require('./app/routes');
    
    var config = JSON.parse(fs.readFileSync(__dirname + '/config.json', 'utf8'));
    
    var api = new API(config);
    var dal = new DAL(config);
    
    initRoutes(api.router, dal);
    

    #######app/routes.js

    module.exports = function initRouter(router, dal) {
    	router.on('/', function (req, res, next) {
    		dal. //< THIS IS WHERE I AM
    	});
    };
    

    Basically, I defined API and DAL "classes" in their own modules. Now I'm writing the routes module, whose job is to connect the two instances (add routes to express app). Inside this method, I have an argument called router and something called dal. I know it is an instance of express app and an instance of my DAL object. But IDE doesn't.

    Can it possibly connect the dots between these modules?

    In VSCode:

    In WebStorm:

    So how could WebStorm possibly know this anonymous "dal" object has my closure-generated readItems method? It doesn't.

    All it knows is that, I some point, I did this.readItems = function () .... And that this reference was exposed to the wider world. So basically, it maintains a cache of global symbols and tries to determine whether any of them matches the stuff I'm typing now.

    Useless? Not at all. This is HUGE help. It SIGNIFICANTLY reduces the annoying typos and helps you recall method signatures without having to look them up.

    VSCode doesn't seem to be doing that. In fact, it looks pretty helpless without its fancy but brittle .ts definitions.

    I may try the debugger and post once more afterwards. But at this point, it seems VSCode's biggest feature (intellisense) might be a lame duck outside the TypeScript world.



  • The last post in my VSCode Review series. The debugger.

    It works. It has local variables. It has call stack frames. You can add breakpoints. When you run a node app, it opens a little console window, instead of redirecting output into its own GUI, which has upsides and downsides.

    But look at this:

    I made a bug here, and used this instead of thisAPI.

    There's no way to inspect this variable. It doesn't appear in "Locals".

    Also, there's zero interactivity with the running code. I can hover over variables, but I can't do anything with the popup. Can't change the active values. Can't even copy them. Can't place conditions on breakpoints. Can't execute arbitrary commands in console (there's no console).

    So, the same deal as with everything else. VSCode has the basics, but is otherwise miles behind the competition. I don't expect any sort of parity for at least a year, presuming other vendors are stationary targets.

    Summary

    VSCode is not bad for the first version. But at this point, there's little reason to switch. Sublime text is MUCH better text editor. WebStorm is MUCH better IDE. WebStorm is even a better text editor than VSCode (although it's significantly slower). VSCode is a better IDE than sublime (intellisense and debugging), but IMO sublime's text editor capabilities more than make up for it.

    Perhaps if you're into TypeScript and like light-weight editors, VSCode could come a bit ahead. Otherwise, I'll give it a few months and try again then. Let's see if MS can keep up the momentum.



  • Does it support SSH for Git? I night have to try this at work.



  • @blakeyrat said:

    Does it support SSH for Git? I night have to try this at work.

    I have no idea, I tried this on a local repo (no remote).

    But as far as I see, there's nothing like push/pull in the interface. They only cover the staging/commit part of the workflow.



  • GitHub supports Git over SSH1 as one of its options, so someone could test it.

    I would except VSCode for some reason isn't working on my work machine.

    1In fact, it appears to be the only way to use personal SSL certificates instead of passwords with Git.



  • Ah, so like every Git client, its incomplete. Natch.



  • @blakeyrat said:

    Ah, so like every Git client, its incomplete. Natch.

    It's a text editor, not git client.


  • ♿ (Parody)

    @cartman82 said:

    It's a text editor, not git client.

    But it has a git client embedded within, apparently? Sheesh...just use the CLI like God intended already.


  • FoxDev

    @cartman82 said:

    It's a text editor, not git client.

    Sounds like it's both to me



  • @cartman82 said:

    It's a text editor, not git client.

    From what you said, it's like 1/3rd of a Git client.



  • @boomzilla, @RaceProUK, @blakeyrat

    Perhaps I don't mind it because that's how I use integrated git functionality in WebStorm too. Staging & commit from within the IDE, push / pull / repo management from the outside. It just feels like a natural divide between editor's responsibilities and the source control.


Log in to reply