Skip to content

Commit c94040f

Browse files
committed
fix: option-shift-left and right not selecting words in mac
We assigned reserved mac keyboard shortcut for word selection nav to code folding. release that shortcut to be unused in all platforms. Expand and collapse current rewired to `ctrl/cmd-shift-[` and `ctrl/cmd-shift-]` in all platforms as that shortcut was released from redundant recent navigation flows. Also, it aligns with `ctrl-[`and `ctrl-]` for indent changing. Expand and collpase all shortcut was never used in usage stats, so removed it.
1 parent 0cbbeb8 commit c94040f

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

src/extensions/default/CodeFolding/main.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,8 @@ define(function (require, exports, module) {
4949
GUTTER_NAME = "CodeMirror-foldgutter",
5050
CODE_FOLDING_GUTTER_PRIORITY = Editor.CODE_FOLDING_GUTTER_PRIORITY,
5151
codeFoldingMenuDivider = "codefolding.divider",
52-
collapseKey = "Alt-Shift-Left",
53-
collapseKeyDisplay = "Alt-Shift-←",
54-
expandKey = "Alt-Shift-Right",
55-
expandKeyDisplay = "Alt-Shift-→",
56-
collapseAllKey = "Ctrl-Alt-[",
57-
expandAllKey = "Ctrl-Alt-]";
52+
collapseKey = "Ctrl-Shift-[",
53+
expandKey = "Ctrl-Shift-]";
5854

5955
ExtensionUtils.loadStyleSheet(module, "main.less");
6056

@@ -360,8 +356,6 @@ define(function (require, exports, module) {
360356

361357
KeyBindingManager.removeBinding(collapseKey);
362358
KeyBindingManager.removeBinding(expandKey);
363-
KeyBindingManager.removeBinding(collapseAllKey);
364-
KeyBindingManager.removeBinding(expandAllKey);
365359

366360
//remove menus
367361
Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).removeMenuDivider(codeFoldingMenuDivider.id);
@@ -419,10 +413,8 @@ define(function (require, exports, module) {
419413
Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).addMenuItem(EXPAND);
420414

421415
//register keybindings
422-
KeyBindingManager.addBinding(COLLAPSE_ALL, [ {key: collapseAllKey}]);
423-
KeyBindingManager.addBinding(EXPAND_ALL, [ {key: expandAllKey}]);
424-
KeyBindingManager.addBinding(COLLAPSE, [{key: collapseKey, displayKey: collapseKeyDisplay}]);
425-
KeyBindingManager.addBinding(EXPAND, [{key:expandKey, displayKey: expandKeyDisplay}]);
416+
KeyBindingManager.addBinding(COLLAPSE, [{key: collapseKey}]);
417+
KeyBindingManager.addBinding(EXPAND, [{key:expandKey}]);
426418

427419

428420
// Add gutters & restore saved expand/collapse state in all currently open editors

src/extensionsIntegrated/NavigationAndHistory/keyboard.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
{
77
"key": "Ctrl-Tab",
88
"platform": "mac"
9-
},
10-
{
11-
"key": "Cmd-Shift-]",
12-
"platform": "mac"
139
}
1410
],
1511
"recent-files.prev": [
@@ -19,10 +15,6 @@
1915
{
2016
"key": "Ctrl-Shift-Tab",
2117
"platform": "mac"
22-
},
23-
{
24-
"key": "Cmd-Shift-[",
25-
"platform": "mac"
2618
}
2719
],
2820
"navigation.jump.back": [

0 commit comments

Comments
 (0)