Github’s Atom text editor is one of the best available. Unfortunately on Windows, there’s no easy way to set Atom as the default editor for specific file formats.
The issue was reported on Github and a viable workaround was devised, however the workaround has its own set of annoyances. Atom user bilderbuchi observes the following:
I got no way to select the Atom icon, I got an empty white rectangle. It flickers the terminal for a split second, which interestingly does not happen when starting atom via the start menu. Annoying, but not vital. It says “atom.cmd” in the relevant dialogs/menus, which is not exactly beautiful/elegant. I can’t imagine a normal user to go through this dance to do this, compared to the experience in other editors like Notepad++.
I’ve created my own solution to this problem by adding an “intermediary” executable file that can easily be set as the default associated program for filetypes that then passes the file along to Atom. The most significant benefit of this method is that it correctly sets the file association icon.
Simply install ‘Atom Editor OpenWith Assistant‘ and associate your code files with ‘C:\Program Files (x86)\Atom Editor OpenWith Assistant\Atom OpenWith Assistant.exe‘
Files associated with the OpenWith Assistant will now display the above Atom icon designed by Tharique Azeez. The hastily written VB.NET code behind this program is available on Github.
Hi, does this target the latest version of the atom.exe?
Yes, it will always target the newest version. At least until Github changes the install location.
Thanks Shane!
But it doesn’t work if a filename has spaces which is especially troublesome for people who have their Windows username as Firstname Lastname.
Does this version fix the problem?
Can’t really test now but I commented under your GitHub Gist with a fixed version. Are you using that?
I didn’t see that, but my fix is basically identical. I wonder why GitHub doesn’t give me notifications on Gist..
Oh well. Glad everything worked out fine.
Thanks, this worked well for me 🙂
When I try to open a single file with multiple words in the title separated by spaces, Atom opens it as empty file with instance for each word. So if I create a file (with some text in it) named “test test” it opens two empty files called “test” and “test”. So, it’s not really working. I’m using latest Atom version.
We’ve covered that in the comments, use this: https://singularlabs.com/wp-content/uploads/2016/02/atom-openwith-assistant.exe
Thanks Shane, it works like a charm!
I have a similar problem with the latest version (2016/02): opening a file with spaces in the FOLDER name – it cause atom to open a bunch of non-existent files.
My path name is: C:\Users\buddy\OneDrive – My Company Name\folder\
(stupid microsoft onedrive for business puts spaces and a dash in the folder name).
Any chance this could be made to work?