Brackets 0.38 Release (Multiple cursors)

Article by: Kevin Dangoor

Brackets 0.38 Release (Multiple cursors)

The latest Brackets release now includes one of the most requested features: multiple cursor/selection support. Plus, as always, we’ve got a good collection of fixes and improvements throughout.

Multiple Cursors

Brackets now lets you create multiple cursors and selections in order to make lots of similar edits at once. It’s useful for things like adding the same text in multiple places or quickly renaming a variable.

There are a couple of basic ways to create multiple cursors or selections:

  • Hold down the Alt key, then drag vertically to create cursors, or drag diagonally to create a rectangular selections.
  • Make one selection, then hold down the Cmd key (Mac) or Ctrl key (Win) and click or drag to add another cursor or selection.

The following video shows some examples of these techniques along with more ways to create and manage multiple selections.

Multiple cursors is one of those things that you might see the first time and say “that’s neat, but I already have find and replace”. And then you start using the feature and you find yourself using it several times a day. Selecting the instances of text that you want to replace and watching the text change as you type has a great feel, especially when coupled with Live Preview. In the example below, I use the “Add Next Match to Selection” keyboard shortcut (ctrl-B on Windows/Linux, cmd-B on Mac) to grab a few instances of the word “Brackets” and then change them:

Multiple selections with Live Preview
Multiple selections with Live Preview

You also notice little, unexpected ways in which the feature saves you time, like visually updating a bunch of strings:

Using multiple cursors to update several lines at once.
Using multiple cursors to update several lines at once.

Multiple cursors and selections provides a bunch of new editor actions, so you might want to check out our documentation for using the feature. Thanks to Marijn Haverbeke and the other CodeMirror contributors for this great new CodeMirror 4 feature.

Inline Editor Hints

It hasn’t always been crystal clear when you could pop open an inline editor for CSS styles (the Quick Edit feature on the Navigate menu). Brackets will now give you some hints when Quick Edit is not available:

Messages appear when Quick Edit is not available.
Messages appear when Quick Edit is not available

Other Changes

  • We’ve continued improving our project find features with performance improvements on Windows and usability improvements for all platforms.
  • .ico files can be viewed directly in Brackets now.
  • Brackets now supports “asynchronous linters”, which are code checkers that require a bit more time to do their processing before they present their errors.
  • In the file tree, you can use ctrl/cmd-click to expand/collapse all of the siblings in the tree. ctrl/cmd-alt-click will collapse a subtree.
  • We added a bunch of UI polish throughout Brackets

Community Contributions

Leave a Reply

Your email address will not be published. Required fields are marked *