Caret: It’s Like Sublime Text for Chromebooks

If you’re a programmer, or if you spend a significant amount of your day working with plain text for any reason, you’ll surely have at least heard of Sublime Text. The one paid text editor that’s won over both Emacs and VI fans, Sublime Text is the gold standard in text editors. And, it’s cross platform, so you can run in on your Mac, Windows, or Linux PC.

There’s only one place it won’t run — Chrome OS. And, of course, it won’t run on any Mac or PC if you don’t have a copy — plus, keeping your settings synced can be a pain at best. That’s why Caret is so exciting. It’s a full-featured code editor in an offline Chrome web app that can run anywhere Chrome runs, for free, and it’ll keep your settings synced along with the rest of your Chrome data.

It's almost Sublime Text, inside Chrome.

Download Caret from the Chrome Web store and fire it up, and your first thought will likely be that you’ve just somehow tricked Chrome into downloading a native app. You’re not too far from the truth — Caret is still a web app, but it runs fully offline, and opens and saves normal text and code files to your computer the same way any other native app would. All the while, though, it’s using Mozilla’s javascript-powered Ace code editor to highlight your code in almost any language you want, from HTML, Javascript, and PHP to even Markdown and TeX.

Caret builds on the Ace foundation to bring a number of Sublime Text-like features, including the famed multiple cursors that makes it easy to edit similar parts of your file at once. Just hold CMD while clicking the locations you want to edit, and you’ll see a cursor at each spot ready for you to edit multiple lines at once. You’ll also find a tabbed interface that’ll let you have all your documents open at once, and a very basic command palate that lets you access options like Find/Replace, Go To (for switching files or jumping to a certain line), and more without leaving your keyboard — though it doesn’t have nearly as many options as Sublime Text.

Screen Shot 2013-10-11 at 9.50.45 PM

 

In another nod to Sublime Text, you’ll find your user settings are saved in a .json file where you can edit your default theme, font, and more just like in Sublime Text (though make sure to only use a monospaced font — other fonts do not work correctly right now). Those settings will be synced with your Chrome account data, along with your bookmarks and more, so Caret will work the very same everywhere.

Overall, the code and text editing workflow in Caret feels just like you’d expect in a native app. It basically just works, and you’ll never be thinking about how it’s a web app or native app. The only odd parts are that the keyboard shortcuts, by default, use the ctrl key instead of CMD, which is correct on a PC or Chromebook but non-native on a Mac. You can edit those, too, from the settings if you’d like, though, so that’s not a big deal. Otherwise, every other text editing keyboard shortcut in your OS should work just as you’d expect in Caret. There’s no code completion, per se, but it will close brackets and code elements for you by default, which is at least a little bit helpful.

Caret might not replace Sublime Text, but it’s sure a great free option on any platform, and easily the best code editor on the Chromebook. But even on a Mac or PC, it’s a pretty nice code editor that’ll only cost you a few seconds to download it. And it’s so much like a native app, it’s easily a great showcase of how Chrome’s offline web apps can be a platform in themselves — one that’s a trojan horse of sorts on Windows and the Mac.


Summary

A Chrome offline web app that lets you code in a Sublime Text-like app on your Mac, PC, or Chromebook, built from Mozilla's Ace.

8
theatre-aglow
theatre-aglow
theatre-aglow
theatre-aglow