What makes Visual Studio Code great is that it makes writing code great. It's a text editor that was released in 2015, built upon Electron. I cannot speak to every feature that defines VS Code, since there are so many, although I will delineate what distinguishes it, generally, from competition.
Here is mainly why I prefer it over other editors:
- Open source code
- Ease of use
- Vim keybinding interoperability
- Fine-tuned integration with the Unity game engine
- Optimized support for remote pair programming
Open source code
VS Code has been maintained under the MIT License by Microsoft on GitHub. While officially distributed binaries include telemetry, it can be disabled in-editor. The telemetry can also be ripped out entirely by using VSCodium binaries. How so?
[VSCodium] is not a fork. [It] is a repository of scripts to automatically build Microsoft's
vscoderepository into freely-licensed binaries with a community-driven default configuration.
You have to hand it to Microsoft for giving users the freedom to use and distribute their editor without any strings attached. Plus, the editor being open source allows a plethora of third-party contributions that would otherwise be impossible.
I, for one, am a huge fan of stewardship of open source projects by well-resourced organizations, first having acclimated to the concept when I worked for a prominent aerospace company. My department had partnered with Pivotal (which has since been absorbed into VMware), who maintained Spring, a wonderful toolkit for building distributed systems with Java. If Spring weren't open source, users wouldn't be able to provide such granular feedback to improve it. This is the same kind of ecosystem that has promoted VS Code's refinement, one that I have learned to appreciate.
Atom is open source and comparable to VS Code, having been built upon Electron and released by GitHub in 2015 (a company which was later acquired by Microsoft). Atom is less feature-rich than VS Code, but it is still maintained due to demand. Alternatively, Brackets, developed by Adobe, is open source and geared for web development, but will be defunct as of September 2021. Adobe recommends using VS Code instead! I wouldn't be surprised if GitHub eventually ended support for Atom in favor of VS Code as well.
Ease of use
Sublime Text was released in 2008, and I used it occasionally before VS Code. It's a good editor with a similar ease of use, but I believe VS Code is more streamlined. Plus, Sublime Text is not open source—you must buy a license to use it in perpetuity. JetBrains offers some extremely powerful editors, but they, too, cost money, and their learning curve is undesirable. I think VS Code wields the greatest ease of use compared to current alternatives.
There are only two keybindings in VS Code you need to know to understand what I mean:
CTRL+Pto search files in the current workspace by name.
CTRL+SHIFT+Pto open the Command Prompt, allowing you to search and execute any available command.
Of course, there are many more keybindings you can and should learn, but these two, in my opinion, are critical.
Vim keybinding interoperability
Speaking of keybindings, let's discuss Vim. Vim is my favorite interactive grammar, if you will. If you're new to Vim, in short, it helps you write code quickly with keybindings. But as a text editor, I think Vim leaves something to be desired. For instance, multi-line editing with Vim has been historically unruly. Using the amVim extension, you get interoperability with VS Code's multi-cursor editing, keybindings, and the most commonly used features of Vim. There's also IntelliSense, a comprehensive autocompletion system that base Vim cannot hold a candle to. Said extension is compatible with IntelliSense and other empowering VS Code-isms.
Few other editors compare with that of VS Code's Vim "emulation."
Fine-tuned integration with the Unity game engine
As someone building middleware and games with Unity, I work with a variety of APIs, many being new and experimental. These APIs aren't always thoroughly documented, but I don't always thoroughly read the existing documentation, either. I depend on IntelliSense to inform me of classes, structs, methods and functions that I may not already be familiar with while programming. I tend to find what I need based on the semantic name, return type and parameters.
On VS Code's website, there is documentation concerning Unity. There's additionally an official package for Unity projects to ensure smooth sailing with VS Code. Basically, the package helps generate
.csproj files, which serve as project metadata for C#. I applaud anyone for disentangling this horrendous aspect of an otherwise fantastic language.
Now, JetBrains' Rider editor is supposedly great for Unity, and perhaps it is more powerful if you are willing to invest the time into it, but it's not open source, nor free. As I previously intimated, many swear by JetBrains. With that in mind, I still find open source alternatives, such as VS Code, more than good enough for my purposes, and said purposes are extensive.
Optimized support for remote pair programming
With screen sharing comes disruptive latency, leading to miscommunication and misunderstanding. While pairing or mob programming remote, I have come to detest popular enterprise software for the latency I mentioned, and also the need to work around visual artifacts related to compression. If I had a dime for every time someone complained about not being able to follow me due to one of these issues, I'd have a lot of dimes.
There may be a time and place for screen sharing, but for code it's not ideal. Consider how much cheaper it must be to share only workspace and cursor information with others, rather than a series of images? Think of how much data transfer you could reduce. Believe it or not, this is possible with Live Share, a free extension maintained by Microsoft. I swear by it. Check it out!
VS Code offers many features I have not discussed here, such as the built-in ability to preview markdown and style it with custom CSS. It includes version control integration too, which makes viewing diffs and handling merges much simpler. VS Code also features an integrated terminal. There's a global workspace search that is accessible via
CTRL+SHIFT+F, as opposed to local file search which is, you guessed it,
CTRL+F. Furthermore, as you probably ascertained, anyone can write and distribute extensions for VS Code, which is how amVim works. Finally, you can debug in VS Code, but if you're like me, you just use print statements everywhere because it makes other programmers' heads explode.
If you're considering VS Code, give it a try!