I’m currently using the Atom text editor. I’ve been trying to stay text-editor agnostic, figuring that I will have plenty of time to optimize later. But lately I’ve been hearing that Vim is worth learning. This thoughtbot post pushed me over the edge, and so this weekend I gave it a shot. I’m still nowhere near ready to use it all the time but working on it.
So tonight I started working on learning to use React with a Rails app. I decided to start building in Atom at first, since that’s what I’m used to. After a while though I figured I’d try Vim.
Of course, I jacked up the spacing on the file I was working on, and gave up (for tonight). I went back into Atom and started working. I edited the component I was working on, refreshed the browser, and:
ExecJS::RuntimeError SyntaxError: [stdin]:5:10: unexpected . (ExecJS::RuntimeError)
The error was coming from layouts/application.html.erb, which was all auto generated code. Wth? I looked back over all my code, looking carefully at the indentations of the coffeescript. Everything, line by line, was correct.
Luckily, Atom has a package manager and so it was easy to install coffee-lint. Sure enough: I had added a line that somehow got pushed down below the code I was looking at. Since the whole file was only a few lines long, I didn’t think to scroll down. But the linter found the error immediately.
So… Atom 1, Vim 0. I see that Vim has some linters available though so I’ll be giving it another shot.