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++?
Introduction to Notepad++
Notepad++ was created to be a replacement for the Notepad text editor that comes standard in Windows. It was first released in 2003. Since then it has become the defacto editor for developers using Windows based systems.
Notepad++ key features include powerful source code highlighting, code formatting, bracket and parenthesis matching and support for pretty much every programming language. Over the years since it's first release, more and more features have been added, including a powerful plugin system, working with files over FTP, macros and the ability to manipulate string encoding and formatting.
Introduction to Visual Studio Code
Visual Studio has been the mainstay of Microsoft development since, well forever. The first Visual Studio was released in 1997 for Visual Basic and Visual C++. Until Visual Studio 2008 was released, it was a very expensive product which could normally be purchased by organisations or wealthy individuals. With the launch of Visual Studio 2008, Microsoft made available Express versions which were offered for free, albeit cut down from the main Professional and Enterprise editions.
The launch of the free Visual Studio Code editor has two main objectives. The new .Net Core 1.0 framework is open source and platform independent, so Microsoft needs to provide a means for non-Windows developers to code on Macs and Linux. Secondly, they are trying to get a slice of the open source developer market.
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.
|Notepad++||Visual Studio Code|
|ActionScript (.as, .mx)||Batch|
|ADA (.ada, .ads)||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|
|Cobol (.cbl, .cbd, .cdb)||Jade|
|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|
|JSON file (.json)||PowerShell|
|JavaServer Pages (.jsp)||Python|
|KiXtart file (.kix)||R|
|List Processing Language (.lsp, .lisp)||Razor|
|Lua Source (.lua)||Ruby|
|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|
|PowerShell (.ps1, .psm1)|
|Python (.py, .pyw)|
|R programming language (.r, .s, .splus)|
|Windows Resource (.rc)|
|Ruby (.rb, .rbw)|
|Scheme (.scm, .smd, .ss)|
|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 together automatically.
Out 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.
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.
Both editors feature the ability to debug code, but while Notepad++ relies on several extensions being installed, and these are third party and buggy at best.
The error and warning panels in Visual Studio Code are also a great feature when writing, as it will instantly inform you of errors before uploading or testing in a browser.
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, 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 it's node.js and Gulp integration.
Both code editors have the ability to 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.
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 having 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.