Time for a new editor
So I’m used to work on Visual Studio 2013, big projects, lots of files, using TFS as a source controller, need to merge files, drag & drop in the files treeview some new images from a designer, need to rename some variables or methods used in many places, it just works flawlessly and the interface is quite responsive (except when some background stuff occurs and you’re good to force close it and restart, that’s faster).
But, wanted to make some new light websites, I asked myself : Should I use Visual Studio to make them ?
It was not feeling right. Visual Studio to handles 2/3 pages and some images/scripts ? I know it could but I’m think I’m too used to use it in a .NET environment so I decided to look around.
I often use Notepad++ to edit any files quickly, but it was not enough, basically, I feel it’s just a syntax highlighter editor, and a mass replacer (with regex), not more. I’ve never used any other functions. Do you ?
Atom
So! I have an account on Github I barely used but still, a lot of projects I’m working with come from there. I was aware of some others applications around Github such as gitter.im, and especially Atom since a while but I through it was not mature enough (it was just the beginning, let’s wait for the people to debug it !).
I decided to give a try again. And I don’t regret it. It’s not a true project manager yet but it’s getting there. And I’m sure there are plugins to make it so.
Because Atom is basically a big plugins/packages manager. It comes automatically with dozen of them that you will need for misc purposes :
– syntax highlighting (all the language-*
packages)
– find and replace
– go to line
– image viewer
– notifications inside Atom
– Atom settings panel
– displays files in a treeview
– snippets management
As you see, you can find some basic packages in there, meaning that if you disabled them, you have a true naked text editor à la Notepad. I have 80 installed packages currently.
Atom is based on packages. There is just a tiny core to manage them, and each of them add a tiny piece of logic. And yes, the community is very active behind to develop more and more quality packages.
Most of them are dynamically removed/added on the fly, no need to confirm or restart, that’s pretty impressive. It can be infortunate to disable some of them, such as the settings-view
one, while you are in the settings. Basically, you are screwed, the whole style is destroyed. You need to edit .atom/config.cson
and just remove the package from the disabledPackages
array. And hop, the settings are back directly in Atom.
A naked Atom
But you can disable everything! You will have the core features only :
– you can edit a file with File > Open
– some super basic edit features (delete a line, uppercase/lowercase..)
– help
– can split panes
– an Atom theme (still need the settings to access it)
– … that’s it.
You can’t look for text, no syntax highlighting, no special panel, no options. Just a super fast Notepad. Meaning they did a great job! When it’s time to enable back every packages, just clear the disabledPackages
array in .atom/config.cson
. (notice that it’s not true JSON, there is no comma, no need of {} for subobjects etc.)
You can find the list of packages at https://atom.io/packages or using Atom : Packages > Settings View > Manage Packages
.
Performances
While using it to edit different files, you can feel it’s very fast, and they really work hard on that. There is a packages pre-installed to first check if Atom loads fast enough: Timecop.
It basically tells you the time the packages needs to load and if some of them are taking more time than expected. But unfortunately, right now, nothing more (no live stats).
I tried to open 2 types of big file :
– one json extraction on one line, 500k characters (520kB). It was very slow to open it and move inside. (using Notepad++ it was fast enough, native eh?)
– jquery.js
source (non minified), 10k lines (278kB). It was very slow to copy/paste inside (about 20s) but to edit, it was fine. It was pretty fast (2s) to open the saved file too. So it seems it’s only the paste feature that has some difficulties with big buffers.
– More than 2MB files : you got a nice notification : Atom can only handle files < 2MB for now. Large file support is being tracked at atom/atom#307.
At the process level, with a few dozen of files opened, it took 250MB max. (application + 4 background processes) Notepad++, as a native application, 20MB. You can see the big cons with WebApplications on Desktop.
Web Application
Atom is a Web Application running on a desktop. You can see that by going to View > Developer > Toggle Developer Tools
. There you will have access to the webkit debugger.
This way, you can code with js, css, html as a lot of people do nowadays, extend very easily the software, and be cross-platform (other OS, and even have the same version online).
But it has its drawbacks too : takes a lot of space (but well, that’s not really a problem anymore no?), a lot of memory, and is not as performant as a native application.
Atom is based on atom-shell.
The Atom Shell framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on node.js and Chromium and is used in the Atom editor.
It’s still actively under development, sure they will enhance speed and add powerful features Atom will benefit from.
If you’re interested in Atom, check out their blog to learn more things : http://blog.atom.io/
I sure missed a lot of cool features provided by some packages. I didn’t even talked about the themes, the git integration, and about some nice packages to have such as :
– atom-beautify
– autocomplete-plus
– auto-indent
– language-generic-config (for .conf)
– minimap (large scrollbar with the code preview inside)
Go grab it: https://atom.io/