From 3aba5a8ce1ea24dc243df1198920a81957d17c5b Mon Sep 17 00:00:00 2001 From: Jeff Jenkins Date: Wed, 1 Jun 2016 07:06:43 -0400 Subject: [PATCH] [sublime keymap] Mimic sublime on OS X with ctrl-shift for selectLines --- keymap/sublime.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/keymap/sublime.js b/keymap/sublime.js index 0da347a99e..ed6b847428 100644 --- a/keymap/sublime.js +++ b/keymap/sublime.js @@ -500,7 +500,8 @@ cm.scrollTo(null, (pos.top + pos.bottom) / 2 - cm.getScrollInfo().clientHeight / 2); }; - cmds[map["Shift-Alt-Up"] = "selectLinesUpward"] = function(cm) { + var selectLinesCombo = mac ? "Ctrl-Shift-" : "Ctrl-Alt-"; + cmds[map[selectLinesCombo + "Up"] = "selectLinesUpward"] = function(cm) { cm.operation(function() { var ranges = cm.listSelections(); for (var i = 0; i < ranges.length; i++) { @@ -510,7 +511,7 @@ } }); }; - cmds[map["Shift-Alt-Down"] = "selectLinesDownward"] = function(cm) { + cmds[map[selectLinesCombo + "Down"] = "selectLinesDownward"] = function(cm) { cm.operation(function() { var ranges = cm.listSelections(); for (var i = 0; i < ranges.length; i++) {