Hacker News new | past | comments | ask | show | jobs | submit login

We're a 100% Go shop and everyone on my team but me uses Visual Studio Code for Go. It's really amazing. (My mind has just been so corrupted by years of vim usage I'm trapped.)

It's bizarre to think my team writes in a language created by Google in an editor created by Microsoft on System76 laptops running Ubuntu. Never would have been possible in the Gates or Ballmer eras.




VS.Code + the go plugin is quite good. I recommend it to my team members who prefer GUI-based editors. VS.Code is surprisingly much faster than Atom even though they share the same electron editor.

I think vim + vim-go is still the best go editor if you know vim. It just works and it gets updated frequently.


There's no such thing as the electron editor. Electron is just a framework for making desktop apps using the client-side layers of the Web stack. It's basically a a little bit more than a glorified Chromium install, minus the browser chrome.

The editors in VSCode and Atom are completely different implementations.


I use Jetbrain's IDEA with a Go plugin and it fits all my needs. Do you know how it compares to VS? Never got into VS myself and i'm hesitant to swap IDE's though I'd be willing to try if it's a significant improvement.


I've switched from PyCharm (based on the same IntelliJ Platform as IDEA) to VS Code, and it's so much faster to work with. That said, I've found that it's not nearly as good at all the code intelligence stuff as PyCharm is.

I've never used IntelliJ's Go tools, but VS Code is much better at that stuff in Go than Python. (I believe it uses third-party open-source tools in both cases; code intelligence for a statically typed language like Go is probably much simpler which probably helps.)

The best way to look at VS Code is as an IDE minus the 'integrated' bit - instead of having the core editor and UI bundled in with all the code intelligence stuff for a specific set of languages, it's a text editor with a code intelligence and debugger UI, that calls out to out-of-process plugins to do the heavy lifting.


Dynamic languages make good tooling very difficult. It makes it painful to transition from Go for hobbies to Python for work. :(


Most go-related plugins are reaching parity in that they mostly use the same background services and utilities to update the editor. My guess is Jetbrain's IDE has roughly the same features. FWIW, VS.code starts up much faster than WebStorm on my machine.


Good to know. When I switched from windows to ubuntu I saw WebStorm start-up improve 2-3x. Haven't tried VS.code yet but I've found JetBrains products to run very well on linux machines.


This is my setup of choice. It's absolutely fantastic.


> much faster than Atom

uggh! yes :) I tried checking out atom and installed the facebook extensions to see what the fuss was all about. It was so slow I could only successfully open it 50% of the time.


opens 50% of the time, every time


You can add an extra bit :

> a language created by Google

by guys using Macintosh laptops

> in an editor created by Microsoft

At a plan9 conference when people turned up with Mac laptops, Brucee (who wrote considerable portions of Go's ancestors - Inferno & Limbo) remarked to me : "the interesting thing about the Mac was that it wasn't X86 and it wasn't Unix ... now it's both!".


Has VS Code still the phone home feature, that can't be turned off? (no it's not okay to sniff on my data or usage, on my computer!)



Only by manually editing internal program files using the command line. Also,

> You will need to apply these changes after every update to disable collection of usage data. These changes do not survive product updates.


The Feb 2016 release has a new setting that (I believe) persists between updates:

https://github.com/Microsoft/vscode/issues/3182

https://code.visualstudio.com/docs/supporting/faq#_how-to-di...


If you build from source, osscode will never connect to those endpoints.

Alternatively, you can just edit them out of the product.json from the release build that you download from MS.


For this extension to work, you need to install several Go tools in GOPATH. How did you manage your GOPATH across multiple projects? Do you have a single GOPATH for every project or each project has its own GOPATH?


I set my GOPATH to my home dir, and only use a single GOPATH for all projects. This way things are where you might expect relative to your home dir (If thinking in FHS (https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard). For example, executables end up in ~/bin, everything else is in ~/src.

Never had any issues with this setup.


I have a single $GOPATH per project and always recommend doing so. If you vendor code with a tool like godep[0], having one shared $GOPATH is a nightmare. Other tools might work better, but this is basically the standard for the projects I work on. I basically just have a zsh alias[1] that combines z[2] and sets the $GOPATH to $PWD split on "src". I do share a single $GOBIN set to $HOME/bin, though.

[0]: https://github.com/tools/godep

[1]: https://github.com/jzelinskie/dotfiles/blob/04ad026f30782189...

[2]: https://github.com/rupa/z


Using govendor with my stuff and a shared GOPATH. I haven't noticed an issue, I wonder what makes it a nightmare for you?


I have a similar setup, but I actually alias the go command itself so I don't have to type anything special.


At work we have a monorepo and therefore a single GOPATH (we use a tool called glock for dependency pinning).

A monorepo a fantastic way to live, but I totally understand that it doesn't work for everyone.


> Do you have a single GOPATH for every project or each project has its own GOPATH?

Yes, a single GOPATH/workspace for all projects, as it is described here: https://golang.org/doc/code.html#Overview


Gaah, I thought this will provide me with some motivation to try writing some Go code but can't even get started with installing the analysis tools - cannot find package "golang.org/x/tools/go/types". Anyway will debug that one later but if anyone has a hint, go ahead.


If the automated install of the analysis tools doesn't work, you can always just manually install them into your GOPATH. See https://github.com/Microsoft/vscode-go#tools.


Thanks, but manual install fails with same error for golint and goreturns.

I ended up git cloning into my %GOPATH%\src\golang.org\x from https://go.googlesource.com/tools and https://go.googlesource.com/net - that seems to have fixed it.


To be fair (and I can't believe I'm saying this), Bill Gates is spending a third of his time punching the clock at Microsoft, advising Nadella. It may not have been technically possible in the Gates era for this to happen, but I certainly agree with you on the Ballmer point. Anyways, I've been wondering how much of this Gates is responsible for.


Which System76 laptops? I'm in the market for a Linux-native laptop which'll compile faster than my MBP.


Not the same person as parent but I wouldn't recommend System 76 personally. I got caught up in the hype and got a Lemur 14" but the build quality is pretty poor and I had awful keyboard issues (since fixed I believe). If you want something that runs Linux well I have stuck with ThinkPad's. You really can't beat them in terms of performance, reliability and Linux support.


We have ~2 year old Gazelle's and the build quality is so bad. The stats are great, but the cases are creaky cheap plastic, the screens scratch/fade easily, the door over the ethernet port breaks easily, the keyboard and trackpad are subpar.

By the numbers I'd go for System 76 again, but if the chassis isn't any better these days I'd probably go back to Lenovo.


Thinkpenguin makes very good stuff. I don't have any experience with the current models, but in terms of build quality and bang for the buck, I think they blow System 76 away.

Admittedly, I use a Thinkpad t430 and a MacBook Air myself, but if I didn't have more laptops than I knew what to do with, I'd be considering Thinkpenguin (though, I'm of the same mind as Linus Torvalds, http://www.cultofmac.com/162823/linux-creator-linus-torvalds... , so I'd be likely to get a refurb'd MacBook Air).

Edit: link to Thinkpenguin site: https://www.thinkpenguin.com/


I'm still on a T420s. Other than the rather crap panel it is a great machine still. I have been holding out for a decent fanless machine. Something with the same sort of power as a 3rd or 4th gen i5/7, M.2 SSD, 1080p or better 14" IPS, etc.

They are getting very close. I work in very quiet environments and I hate fan noise. Also no moving parts!


Thinkpads ceased to be Thinkpads in all but name, ever since Lenovo acquired the division. Unless you are talking about old IBM Thinkpads?


I kind of agree, they are not as awesome as they used to be but I don't know if that is totally Lenovo's fault. Back when ThinkPad's where an IBM product laptops were bit and chunky, then we had ultrabooks and Lenovo had to compete. I believe IBM would have had to compete in the same way just like Dell and HP have had to. The Latitude series isn't as great as it was 5+ years ago. As they get thinner and lighter with less removable components they become less end-user friendly.


I recently got a thinkpad L440, I chose the bad wifi chipset (I did some research first, nowhere would have had read about that issue), and that chipset is not supported.

I installed some backport which seems to turn off/on at times.

I don't think there are decent brands for linux, or it might require deeper pockets. That's the cost of not working with microsoft.


My main machine is still a T420s and it runs every Linux version I through at it without fail. I haven't heard any bad things about more modern T series (or W series) with Linux, not sure about the L series though sorry.


I bought a System76 years ago. It was great as long as I was running Ubuntu, but requires proprietary drivers which have been extremely flaky under Debian. Now I recommend zareason to folks who ask. Typing this comment on a zareason system right now, and I'm extremely happy with it.


Yeah it looks like the consensus is that the System 76s aren't worth it. I'll look into Zareason and Thinkpenguin, thank you very much!


I'm using a very old Macbook White (MB 5,2 model) running Ubuntu 14.04 natively with no OSX in it [0]. Everything runs great but need to install the driver for iSight (easy to do).

I'm very happy with the setup.

Something worth to consider :)

[0] http://bit.ly/1Quv2uY


Getting 16gb of RAM in a laptop (without having to add any yourself) is fantastic. As I said below, by the numbers System76s are fantastic.

Just make sure their chassis/build quality is better than it was a couple years ago. Otherwise in a year you'll have broken bits and a faded scratched screen.


I have the puri.sm librem 13" and really like it. The only issue I have so far is that I have to build a custom kernel if I want to use the more advanced touchpad features on a stock debian install.


I want to start using Visual Studio Code but I am waiting for a VIM emulator plugin that is "good enough" have you tried any of them?


While I'm far from a vim pro, I've never found a vim plugin that didn't frustrate me. Hence I've been stuck in vim because my brain just can't get used to non-modal editing.

Just heard from a coworker after I posted this he's switching back to vim because the vim plugin for VS Code isn't quite there.


Visual Studio != Visual Studio Code, but VsVim for Visual Studio is excellent, and this is from a daily/advanced Vim user.


Same for me, which is why nvim is so exciting.


I am playing around with https://marketplace.visualstudio.com/items?itemName=vscodevi...

It has most of the basic stuff working. I will admit that with the auto complete and what not it isn't quite like my native vim experience. I have actually been thinking about disabling it and just trying to learn the VScode short cuts.


Recent issue discussing this - https://github.com/Microsoft/vscode/issues/3600


This is great. Its too bad there isn't a +1 button for comments in github issues, because some of them are just incredibly important to highlight. I just installed VSCode and was impressed overall and would absolutely use it, except I could never switch to an editor that didn't have basic things like this, which was mentioned in the issue thread.

  Numeric arguments (3dd, 2x, ...)
  support for combining commands (ci[, cW, ggVG, ...)
  visual commands
Anyone who uses vim primarily lives by these features.


Good feedback. I'm working on how we can improve the vim experience in VS Code Now that we have essentials completed (accessibility, localization) this is an important use case for us.

Disclaimer: I'm on the VS Code team. Ping me on Github @waderyan or Twitter @waderyan_.


amVim is the better of the two, but VSCodeVim is the one that seems to have the most mindshare (almost definitely because of the name and it came first).

Both amVim and VSCodeVim still have problems that mean they're not drop-in replacement for even stock Vim, but most of them come down to limitations in the VSCode extension APIs at this point.

https://marketplace.visualstudio.com/items?itemName=auiworks...


I tried one recently (2 months ago) and no it's not good enough.

The integrated debugger via delve is absolutely great.


Yeah, I am not a Vim shortcut aficionado at all, but not having . be repeat command was such a deal breaker for me.


Can anyone who uses Visual Studio Code compare its functionality to the native Visual Studio? I forgot about this project because it's seldom mentioned:

https://code.visualstudio.com/Download


I use VSCode daily and I love it.

I've always been a fan of lightweight text editors and always choose speed over piles of functionality. To me Visual Studio feels like trying to run while wearing cement shoes. It takes forever to load and crashes/freezes far too often for my taste.

VSCode is amazingly light weight and stable and brings in IntelliSense, basic refactoring tools, and pretty solid git integration.

If you're used to using a full-featured IDE like Visual Studio (etc) you'll probably find VSCode lacking (but blazingly fast). If you're used to using sublime, atom, etc... You'll find VSCode to be feature rich and comparably fast.

(I work at Microsoft, but not on VSCode or Visual Studio. These opinions are my own and don't represent Microsoft)


I feel like these editors that pull in entire browser runtime and run JavaScript aren't really light weight or stable.

It takes about 3 seconds for Visual Studio to open on my desktop; not exactly forever.


Loading Visual Studio is (decently) fast. Loading a solution with 1000s of files takes FOREVER compared to VSCode which loads basically instantly because it's folder based.


Yeah. VSCode has infinitely more functionality on my macbook than VS does. :D

But seriously, if you're running Windows and have a VS license, use VS. Otherwise use VSCode.

VSCode is the best IDE for TypeScript. Some will point at atom, they are wrong.


Visual Studio 2015 Community Edition is zero cost and doesn't appear to have any obvious weaknesses (apart from being Windows only):

https://www.visualstudio.com/en-us/products/compare-visual-s...


VS Community Edition has licensing restrictions if you're using it at work:

An unlimited number of users within an organization can use Visual Studio Community for the following scenarios: in a classroom learning environment, for academic research, or for contributing to open source projects.

For all other usage scenarios: In non-enterprise organizations, up to five users can use Visual Studio Community. In enterprise organizations (meaning those with >250 PCs or >$1 Million US Dollars in annual revenue), no use is permitted beyond the open source, academic research, and classroom learning environment scenarios described above.

https://www.visualstudio.com/products/visual-studio-communit...


It's a completely separate project. I'm not sure there's a useful comparison between the two.


How is it as an editor? There are already lots of popular choices: vim, Emacs, Sublime, Atom, etc. How are the plugins? Code completion, multiple cursors, AceJump, etc?


Jesus, just try it dude! No one can confirm your personal preferences for you. It's literally the easiest application in the world to try out, doesn't even require installation.


Code completion is not as good. I believe VSC uses gocode. VS 2015 also has a cool new feature that shows you references to each function right above the function declaration. Clicking on the reference count will open a quick jump contextual menu.

I wouldn't compare the two products. VS has a SQL editor. It manages database connections. There is an integrated merge tool that is actually quite good. You have project templates, which I haven't found with VSC (I haven't really looked).


> VS 2015 also has a cool new feature that shows you references to each function right above the function declaration. Clicking on the reference count will open a quick jump contextual menu.

This feature is actually also available in VS Code[0], though only for C# currently. We should be able to add support for this in Go as well[1].

[0] https://code.visualstudio.com/Docs/editor/editingevolved#_re...

[1] https://github.com/Microsoft/vscode-go/pull/75


Very nice feature. While you're in there tinkering under the hood, how about wiring it up for JavaScript & Python, too? (I'm mostly kidding, because this appears to be exactly the direction you're already heading.)

But PLEASE enable basic drag and drop text editing as soon as you can. Since the 1980s, EVERY text component, text editor, IDE, and word processor Microsoft has ever made has had the basic editing ability to drag a selected bit of text and drop it into a new location, with the maddening exception of VS Code where, when you try to drag your selection, you just lose the selection.

There are multiple requests for this in the feature request section of the VSC website, but unfortunately everybody calls it by a different name, so a single, higher-priority issue that would be suggested to most voters as they look over the top of the list is instead recorded as a bunch of low-priority issues lost down in the weeds, discovered by so few that it keeps getting recreated as a new issue.


That would be amazing. It's a great way to study an unfamiliar code base. It's a great feature on its own as well.


That cool new feature was actually present in VS2013. VS2015 has even cooler stuff but for sure the reference count existed in VS2013.


Thanks for the correction. Can you tell which version I skipped? ;P


VS Code is a programmers text editor. It has great support for a lot of the things Atom does well for example. It isn't an IDE in the same way you most likely think of Visual Studio. It is free though so why not give it a try?


It depends a lot on what language you're writing. VS has a lot more features, but they tend to be for more established languages (namely C++/C#).


The only thing holding me back is the lack of an integrated terminal. This is absolutely essential to my *nix workflow and I can't for the life of me imagine a reason to not include it. Otherwise, I love what I'm seeing here.


>This is absolutely essential to my nix workflow*

Well, most editors and even IDEs don't offer one.

>and I can't for the life of me imagine a reason to not include it.

The reason being that terminal semantics are hell difficult to implement, and doubly so in a web-based stack?


I'm using IntelliJ with the golang plugin at the moment and am spoiled by the integrated terminal. A quick Google search seems to indicate that the atom editor has a terminal plugin so maybe that would be a good basis for a port. VS Code feels much snappier than IntelliJ so I look forward to the day with an integrated terminal is available.


Shouldn't attribution of Visual Studio Code also be given to Google since it uses a large portion of code from the Chromium project?




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: