For many years I have been developing web applications. I’m usually faithful to an editor because I like to get to know it and all its features in order to be more productive.
I am currently developing with Ruby on Rails, and my favorite editor is TextMate 2. In this article, I will explain my reasons for this by comparing it with other well-known editors.
In TextMate, the file browser is on the right by default. That seemed strange to me at first, but then I started to feel comfortable because I write the code from left to right, as if it were a notebook, and having the file browser on the right helps me focus on the code.
The look and feel is very Mac-style. It uses the same icons as the Finder, including the arrows next to each directory. In fact, when you enter a directory there is an animation, just like the system. It even hides hidden files by default, it’s the native macOS experience.
In Sublime Text, the look-and-feel is personalized. A very pleasing grayscale is used, with very similar behavior to native macOS, including the animation when entering directories. It shows hidden files by default.
In Atom the customization goes further, losing the animation when entering directories and opting for a more minimalist display, using a dark mode throughout the editor. Hidden files are also displayed by default.
Visual Studio Code completely customizes the interface as well. It does not have animation in directories, and the icons are colored, but minimalist at the same time. It also splits the browser in two, separating the entire file tree from the open files.
Interesting to note that on the left there is a vertical bar with shortcuts to the essential functions of the editor, replacing the file browser when clicking on each one.
Brackets does not use icons, but it replaces them with something interesting: it highlights the extension of the files. There is no animation for directories either.
The main difference between TextMate and the others is that TextMate is a native application for macOS only, and this is noticeable in the configuration.
As you can see, TextMate displays a classic configuration window, where the most common extensions can be installed from the Bundles tab. In addition to these, there are others that can be downloaded and installed with a double-click, like Safari extensions. Older bundles, however, must be downloaded as a ZIP file and installed manually in a specific directory.
In addition to the configuration window, a file called .tm_properties can be configured, which can be in the personal directory or the directory of each project. To find out what to configure in this file you need to search for shared settings in GitHub, but there is no base template to customize. I imagine that Mac’s simplicity philosophy has been applied to this application so that those who are truly interested will have to dig around to configure advanced features.
In my case, I have only configured the ignored directories for searches, as seen in the following screenshot.
In Sublime Text 3 a dedicated configuration editor opens, where on the left you can see a template with the default settings, and on the right you can overwrite them to customize. It is a very developer friendly way to configure the editor, having all the supported options available.
To install new packages, this editor has a package manager, which is installed the first time you access it. Then there is the option to install packages, which displays a list of available packages, installable by just selecting them.
Atom has a mixed way to configure from the two previous editors. On the one hand, it shows some tabs to group the most important options, where they can be easily and visually customized.
On the other hand, there is a search engine for packages and themes, which shows a list sorted by downloads. Clicking the Install button installs a particular package, and it is ready to use, no need to restart the editor.
The configuration in Visual Studio Code can be done in the same way as in Atom. On the one hand, there is a template with the available options, customizable on the right.
And on the other hand, there is an extension search engine. After installing, you have to restart the editor, traditional in Microsoft :)
Brackets uses the same approach as Atom and Visual Studio Code to configure options.
Same case for installing extensions. An extension can also be installed by dragging the ZIP file to the window or by specifying a URL. The editor must be reloaded after installing or uninstalling.
When I develop, I usually have two open browsers with several tabs, the code editor, the application server running, the code repository application, a messaging application, the email application, iTunes, and so on. Memory consumption should be optimized, because the code editor, despite being the most important tool in my work, is technically another function of the chain of programs open in my day-to-day. And if we add big applications, we’ll soon run out of memory.
For this test I will have only two tabs open:
One with a Ruby on Rails controller, of about 300 lines of code
A small ERB template of 18 lines of code
TextMate 2 is a macOS native application and exclusive to this operating system. Perhaps this is why it is well optimized and consumes very few resources.
As you can see, it takes only 61MB
Sublime Text 3, being also a native application of macOS (although not exclusive), has a reasonably optimized consumption, as seen below.
It consumes almost the same than TextMate 2, and sometimes without doing anything, just by changing the focus to the application, it takes around 111 MB, but then it stabilizes again at 77 MB.
A total of 415 MB consumed. It may not seem much, but compared to the previous editors it is a very significant difference.
Visual Studio Code also uses the same framework as Atom: Electron, ensuring a similar memory consumption.
But surprisingly, the consumption is a little lower than Atom: 384 MB. And although they share the base, the features have been developed by different teams, naturally.
The processes sum up 334 MB, very much in line with the editors of its style.
I continue analyzing the details of syntax highlighting and file type detection in the next article of this series.