A couple of days ago I finally got my invite to Atom editor. A bit late, but I still was excited.
It makes overall positive impression and has some essential things bundled (save on lost focus, trim trailing whitespaces, etc.) But still there are some things lacking. So I decided to check out its praised extensibility.
Again, docs look good and cover some first steps. But I spent a good couple of hours today, trying to invoke my custom command.
1 2 3 4 5 6 7
process in the listing above is a simple action. It gets current editor and inserts string “hello” at the cursor. I defined an editor shortcut, like this:
myext is the name of my extension. But upon pressing the hotkey, nothing happened. A couple of hours later I got the solution. My mistake was in assuming that Atom will somehow discover and dynamically call that exported method
process. It’s exported for a reason, right? Well, no. It turns out that you have to bind commands manually.
1 2 3 4 5 6 7 8
Next time, we’ll do something useful. :)