From b77696f8396956eafcf5e77cb6541fcc9029207a Mon Sep 17 00:00:00 2001 From: David Waterston Date: Thu, 23 Apr 2015 23:59:15 +0100 Subject: [PATCH] Change hotkey to ensure compatibility with Brackets 1.3 The previous hotkey used by this extension - CMD/CTRL-ALT-] - is now used by Brackets. This change switches the default hotkey to be CMD/CTRL-ALT-RIGHT ARROW. --- README.md | 9 +++++---- main.js | 2 +- package.json | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 35c4c28..51d435d 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ ## 'Go to Matching Bracket' in Brackets editor - + -A [Brackets](http://brackets.io/) extension to instantly locate and place the cursor on the matching bracket to the one under the cursor. Adds an entry called _Go to Matching Bracket_ to the _Navigate_ menu with a shortcut of Command-Alt-] (Mac) or Ctrl-Alt-] (Windows). +A [Brackets](http://brackets.io/) extension to instantly locate and place the cursor on the matching bracket to the one under the cursor. Adds an entry called _Go to Matching Bracket_ to the _Navigate_ menu with a shortcut of Command-Alt-→ (Mac) or Ctrl-Alt-→ (Windows). **Note that this shortcut was changed in version 2.0.0 as release 1.3 of Brackets now uses the original shortcut for _Expand Current_**. The 'brackets' characters that are matched are (, ), {, }, [ and ]. -Brackets Goto Matching Bracket in action +Brackets Goto Matching Bracket in action ## Install @@ -82,7 +82,7 @@ Lastly, if the _maxScanLineLength_ preference is set too low then some lines in A: It can be difficult to choose a hotkey for an extension. While it's easy enough to avoid the keys assigned by Brackets itself, it's impossible to know what other extensions may be using (or even what external apps might be listening for). If you find that the default key combination (CMD-ALT-] / CTRL-ALT-]) is not suitable you can override my choice by editing your _User Key Map_ file. This is done using the _Debug_... _Open User Key Map_ menu item and adding in a new entry like this in the _overrides_ section: ``` -"Cmd-Shift-Z": "davidwaterston.goto-matching-bracket" +"Cmd-Shift-Z": "davidwaterston.goto-matching-bracket.findMatch" ``` where you would replace the _Cmd-Shift-Z_ with your preferred key combination. @@ -98,6 +98,7 @@ A: That's not really a question but, if you think one of the translations is wro ## Release History | Date | Version | Summary of Change | | :--- | :------ | :---------------- | +| 2015/04/23 | v2.0.0 | Breaking change: With the release of Brackets 1.3 the original keyboard shortcut used by this extension - Command-Alt-] (Mac) or Ctrl-Alt-] (Windows) - has been taken by the Brackets _Expand Current_ command. This release changes the default shortcut and confirms the extension continues to work in v1.3 | | 2015/04/06 | v1.7.0 | Added new preference setting, _enabled_, which allows the extension to temporarily be turned off. | | 2015/03/31 | v1.6.0 | Added .editorconfig, to ensure consistency of whitespace across different editors and IDEs. | | 2015/03/29 | v1.5.0 | Documentation update. Added a License file and badges to the README.md to indicate the version number, the license type and that the releases are signed using Gnu Privacy Guard (GPG). I also added info about how to verify the signatures on releases/tags. In previous releases I have only increased the version number when there has been functional (no-documentation) changes made to the repo but from now on I will bump the version up even if only documentation has changed. | diff --git a/main.js b/main.js index 5d329b3..36e588a 100644 --- a/main.js +++ b/main.js @@ -93,7 +93,7 @@ define(function (require) { var menu = Menus.getMenu(Menus.AppMenuBar.NAVIGATE_MENU); menu.addMenuItem( COMMAND_ID, - "Ctrl-Alt-]", + "Ctrl-Alt-Right", Menus.LAST_IN_SECTION, Menus.MenuSection.NAVIGATE_GOTO_COMMANDS ); diff --git a/package.json b/package.json index 12c6f85..1bbee1e 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "davidwaterston.goto-matching-bracket", "title": "Go to Matching Bracket", - "description": "Instantly locate and place the cursor on the matching bracket to the one under the cursor. Simply place the cursor on any one of {, }, (, ), [ or ] then press CTRL-ALT-] (CMD-ALT-] on Mac) or use the 'Navigate... Go to Matching Bracket' menu item to locate and place the cursor on the matching opening or closing bracket.", + "description": "Instantly locate and place the cursor on the matching bracket to the one under the cursor. Simply place the cursor on any one of {, }, (, ), [ or ] then press CTRL-ALT-RIGHT (CMD-ALT-RIGHT on Mac) or use the 'Navigate... Go to Matching Bracket' menu item to locate and place the cursor on the matching opening or closing bracket. NOTE: v2.0.0 changes the hotkey for compatibility with Brackets 1.3.", "homepage": "https://github.com/davidwaterston/goto-matching-bracket", - "version": "1.7.0", + "version": "2.0.0", "author": "David Waterston", "license": "MIT", "i18n": [