Skip to content

Commit

Permalink
[sublime keymap] Mimic sublime on OS X with ctrl-shift for selectLines
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Jenkins authored and marijnh committed Jun 19, 2016
1 parent 047afd2 commit 3aba5a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions keymap/sublime.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -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++) {
Expand Down

0 comments on commit 3aba5a8

Please sign in to comment.