Starting Brackets from the Mac terminal command line

With the imminent release of Brackets 1.3 we now have the much-needed ability to easily start the editor from the terminal.

 
Setup of the command line shortcut takes just a couple of minutes:


1. Install Brackets 1.3

The latest version should be released for automatic update in a few days but if you can’t wait you can download the pre-release version right now from the Brackets GitHub repository.


2. Install the Command Line Shortcut

Start up Brackets then select the File… Install Command Line Shortcut menu item which now appears at the very bottom of the File menu.

Install the Command Line Shortcut

You’ll be asked to confirm your password, then the shortcut will be installed.

If everything went smoothly you’ll see a confirmation message and Brackets will be ready to use from within terminal:

Brackets Command Line tool installed

Notice that you can open a single file or switch projects.


3. Start Brackets from within terminal

brackets_zsh

As is common with other GUI apps started from the terminal there is one peculiarity:

  • If Brackets is closed, it will be started, the file (or project) to be edited will be loaded and the app brought to the front
  • If Brackets is open but not on top (or in another space), the file (or project) to be edited will be loaded and the app brought to the front
  • If Brackets is minimised, the file (or project) to be edited will be loaded but the app will not be brought to the front. This can be confusing if you haven’t seen this behaviour before because it appears that nothing at all has happened.

More info about Brackets 1.3 can be found in the release notes on GitHub.
Command line startup can also be set up on Windows; brief details are in the release notes.

Adobe unveils Brackets, “A free, open-source code editor for the Web”

Adobe Brackets LogoAdobe today announced the general availability of Brackets, a lightweight, “free, open-source code editor for the Web”. Built entirely with HTML, Javascript and CSS (though currently running in a OS-specific wrapper rather than the browser) this is a very early release. In the few hours I’ve been using it, it has been generally stable on both Windows and Mac though it still suffers from lack of features and sluggish performance. Despite this it’s certainly usable and gives a good indication of where Adobe are heading with this app. Two of the features that are included are worthy of note, incomplete though they are:

  • Inline editing
    Also called “the quick editor”, this is definitely an innovation worth having. With this feature we can place the cursor over, say, a body tag and click Cmd/Ctrl-E and a small inline editor overlays pops up showing all of the css rules that apply to that tag, even though they may be defined in multiple, external files. Better yet, we can edit them in place and save them back to their original files, all without leaving our main editor window.
    This feature already works pretty well (it can be a little slow to open) – I’d really like to see it appear in other editors (Sublime Text, for example).
  • Live Development
    Live Deveopment  allows you to make changes in the editor and instantly see them applied in the browser, without having to refresh the page. If you work with two monitors or a large screen this can be a very productive way to develop. Mac developers may already be familiar with this kind of syncing from apps such as the excellent Live Reload though this is the first time I have seen it built directly into the editor.
    Unfortunately, I couldn’t get this to work reliably using Chrome 20 beta on OSX Lion… changes would sync and appear in the browser, only to be followed by an error message and a prompt to reload Chrome.
Both of these features are shown in the following video from Adobe:

 

Adobe are keen to emphasise that this is a very early, unfinished, pre-release version of Brackets with many missing features and a long way to go before it matches the polish or performance of other code editors such as Sublime Text. Despite that, it’s an ambitious project and has the potential to really deliver something fresh and innovative. I’d recommend that you get a copy and give it a try for a few days and, if you have any HTML, CSS or Javascript skills, have a look at the source code that comes with the download and consider making a contribution to help make it even better.

 

More: