A Beginner's Guide to Visual Studio CodeDiscover the power of Visual Studio Code with this beginner's guide. Learn how to navigate the interface, customize settings, and boost your productivity.
Surprisingly Visual Studio Code is a cross-platform editor - it works on Windows, Linux and Mac. Microsoft usually only release software for their Windows environments, with only a few being ported to Mac OSX, so is this a sign of changing times? Let's hope so. With the release of .Net Core, Microsoft is looking to enter into the open-source Linux market dominated by PHP and Apache.
The lightweight nature of Visual Studio Code is obvious as soon as you start it. It would be hard to imagine a more basic screen than the initial view you'll have. Once you start entering some code, things will start to look more familiar with an explorer view down the left-hand side and IntelliSense support in the main window.
As a code editor, Visual Studio Code supports all the basics one would expect such as full syntax colouring and highlighting bracket matching and linting, plus keyboard bindings and snippets. It also provides built-in Github integration and IntelliSense support. It was also built to be fast.
Can we build a code editor fast enough that it doesn't feel like you're typing in a browser?
Visual Studio Code is also a community editor, with hundreds of extensions and plugins available for download on the extension gallery. There are extensions for Node.js, Go, C++, PHP, and Python, as well as many more languages, linters, and tools. Chances are if Code doesn't do something you need it to, there is a plugin for doing just that.
I quite like the editor, it's nice and easy to use as you'd expect. It has a lot of the features I'm used to from Visual Studio Professional, without a lot of the extra bloat that comes with it. At the moment I would have to say it's not particularly fast, at least not in my setup. Notepad++ and Notepadqq are still my de facto code editors, at least for the time being.
That being said, Visual Studio Code is not itself open source. Those of you who don't trust Microsoft and its proprietary apps should be aware of the fact that "When this tool crashes, we automatically collect crash dumps so we can figure out what went wrong. If you don't want to send your crash dumps to Microsoft, don't install this tool."
Visual Studio Code - Can it beat Notepad++?
Visual Studio Code is a brand new, free code editor from Microsoft optimised for building and debugging modern web and cloud applications. How does it stack up against the most popular source code editor, Notepad++?
Features Comparison
So how do these two editors stack up? Let's have a side-by-side comparison of the main features each application has to offer.
Language Support
Notepad++ | Visual Studio Code |
---|---|
ActionScript (.as, .mx) | Batch |
ADA (.ada, .ads) | C# |
Assembler (.asm) | C++ |
ASP (.asp, .aspx) | Clojure |
AutoIt (.au3) | Coffee Script |
Unix Scripts (.bash, .sh, .bsh, .csh) | CSS |
Batch Files (.bat, .cmd, .nt) | Dockerfile |
C source (.c) | F# |
Categorical Machine Language (.ml, .mli, .sml) | Go |
CMake (.cmake) | Groovy |
Cobol (.cbl, .cbd, .cdb) | Jade |
CoffeeScript (.litcoffee) | Java |
C++ (.h, .hpp, .hxx, .cpp, .cxx, .cc) | JavaScript |
C# (.cs) | JSON |
CSS (.css) | HandleBars |
D programming language (.d) | HTML |
Diff file (.diff, .patch) | Ini |
Fortran (.f, .for, .f90, .f95, .f2k) | Less |
Haskell (.hs, .lhs, .las) | Lua |
HTML (.htm, .html, .shtml) | Makefile |
MS INI (.ini, .inf, .reg, .url, .wer) | Markdown |
Inno Setup (.iss) | Objective-C |
Java Source (.java) | Perl |
Javascript (.js, .jsm) | PHP |
JSON file (.json) | PowerShell |
JavaServer Pages (.jsp) | Python |
KiXtart file (.kix) | R |
List Processing Language (.lsp, .lisp) | Razor |
Lua Source (.lua) | Ruby |
Makefile (.mak) | Rust |
MATLAB (.m) | Sass |
MSDOS/ASCII Art (.nfo) | SQL |
Nullsoft Script (.nsi, .nsh) | Swift |
Pascal (.pas, .inc) | TypeScript |
Perl (.pl. .pm, .plx) | Visual Basic |
PHP (.php, .php3, .php4, .php5, .phps, .phtml) | XML |
PostScript (.ps) | |
PowerShell (.ps1, .psm1) | |
Python (.py, .pyw) | |
R programming language (.r, .s, .splus) | |
Windows Resource (.rc) | |
Ruby (.rb, .rbw) | |
Scheme (.scm, .smd, .ss) | |
SmallTalk (.st) | |
SQL (.sql) | |
Tool Command Language (.tcl) | |
TeX file (.tex) | |
Visual Basic file (.vb, .vbs) | |
VeriLog (.v, .sv, .vh, .svh) | |
VHSIC Hardware Description (.vhd, .vhdl) | |
XML (.xml, .xaml, .xsl, .xslt, .xsd, .kml...) | |
YAML (.yml, .yaml) |
It's clear from this that in terms of total languages supported, Notepad++ takes the prize on this one, however, both editors fully support all the main languages used today. Just because a language isn't listed, doesn't mean the application cannot read the file. Most, if not all source files are plain text so even humble old Windows Notepad can open them. You just may not get the right syntax highlighting and code completion options.
Source Control Integration
Source control is a set of tools designed to keep application source file versions backed up in a repository and synchronisation between developers. Using source control allows files to be versioned and changes to documents and source files are recorded. It also allows large teams to work simultaneously on the same files and have changesets merged automatically.
Out of the box, Notepad++ does not support any source control system, although plugins are available for limited SVN support.
Visual Studio Code on the other hand natively supports GitHub, one of the three major source control systems, and one of the two free solutions.
General Tasks
Both editors do a fine job of editing, while Notepad++ has the edge on performance and speed, Visual Studio Code has a bit more flexibility and Intellisense makes writing code a lot quicker. While Notepad++ has a form of auto-complete, it is nowhere near as good as you'd expect.
With Notepadd++ there is generally no help included, your best bet is Google searches if you get stuck, but that said there are not many times when you get stuck with Notepad++ as it is fairly simple to use.
Debugging
Both editors feature the ability to debug code, but Notepad++ relies on several extensions being installed, and these are third-party and buggy at best.
Visual Studio Code, on the other hand, has built-in debugging support for the Node.js runtime and can debug JavaScript, TypeScript, and any other language that gets transpired to JavaScript. It can also debug other languages including PHP, Ruby, C# and Python with the use of the Debugging extensions which are much more reliable.
The error and warning panels in Visual Studio Code are also a great feature when writing, as they will instantly inform you of errors before uploading or testing in a browser.
Performance
As I mentioned previously, Notepad++, in my opinion, starts up and is more responsive than Visual Studio code. I love the ability to have an instant opening of files and start editing without having to wait for bulky IDE to load, then sort out plugins and extensions, and then finally show the code file. Memory usage in Visual Studio Code is also quite high since it loads in a lot of extra features that may not be needed, especially its node.js and Gulp integration.
Extensions
Both code editors can load extensions and plugins, and this is where Visual Studio Code takes the lead.
Extensions in Notepad++ are typically downloaded from the website in zip format, where you unzip the DLL to the correct folder in the Notepad++ directory. Sometimes it loads the first time, other times it requires extra files copied to your user profile.
Visual Studio Code, on the other hand, is a lot more refined and features a plugin store where you can download and install extensions with a single click.
Conclusions
For me, Notepad++ is still the best code editor. While Visual Studio Code has many great features, I just don't use these features so I can't warrant the extra overhead they introduce. I also love the portability of Notepad++, just have it on my thumb drive ready to go. I also find that the bracket and tag matching in Notepad++ is a little bit more accurate and easier to read.
- Download Notepad++
- Download Visual Studio Code
If you haven't tried out Visual Studio Code yet, please download it and let us know what you think!