From 196a0196c37ea194d814462a5e9fdf77c163f3b4 Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Fri, 24 May 2019 15:02:36 -0400 Subject: [PATCH] Update cursorWordPart commands Update subword keybindings to match Sublime Text's: Mac: ``` { "keys": ["ctrl+alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} }, { "keys": ["ctrl+alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} }, { "keys": ["ctrl+alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} }, { "keys": ["ctrl+alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} }, { "keys": ["ctrl+left"], "command": "move", "args": {"by": "subwords", "forward": false} }, { "keys": ["ctrl+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} }, { "keys": ["ctrl+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} }, { "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} }, ``` Windows: ``` { "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} }, { "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} }, { "keys": ["alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} }, { "keys": ["alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} }, ``` Linux: ``` { "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} }, { "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} }, { "keys": ["alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} }, { "keys": ["alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} }, ``` --- package.json | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index fe9c47c..0165a27 100644 --- a/package.json +++ b/package.json @@ -427,7 +427,7 @@ "win": "alt+left", "linux": "ctrl+alt+left", "key": "ctrl+alt+left", - "command": "cursorWordStartLeft", + "command": "cursorWordPartLeft", "when": "editorTextFocus" }, { @@ -435,7 +435,7 @@ "win": "alt+right", "linux": "ctrl+alt+right", "key": "ctrl+alt+right", - "command": "cursorWordEndRight", + "command": "cursorWordPartRight", "when": "editorTextFocus" }, { @@ -443,7 +443,7 @@ "win": "alt+shift+left", "linux": "ctrl+alt+shift+left", "key": "ctrl+alt+shift+left", - "command": "cursorWordStartLeftSelect", + "command": "cursorWordPartLeftSelect", "when": "editorTextFocus" }, { @@ -451,9 +451,29 @@ "win": "alt+shift+right", "linux": "ctrl+alt+shift+right", "key": "ctrl+alt+shift+right", - "command": "cursorWordEndRightSelect", + "command": "cursorWordPartRightSelect", "when": "editorTextFocus" }, + { + "key": "ctrl+left", + "command": "cursorWordPartLeft", + "when": "editorTextFocus && isMac" + }, + { + "key": "ctrl+right", + "command": "cursorWordPartRight", + "when": "editorTextFocus && isMac" + }, + { + "key": "ctrl+shift+left", + "command": "cursorWordPartLeftSelect", + "when": "editorTextFocus && isMac" + }, + { + "key": "ctrl+shift+right", + "command": "cursorWordPartRightSelect", + "when": "editorTextFocus && isMac" + }, { "mac": "cmd+j", "key": "ctrl+j",