From 3ae5212f060b729f095871f8fad96c9699e0a8b3 Mon Sep 17 00:00:00 2001 From: Horace He Date: Sat, 6 May 2017 16:28:49 -0400 Subject: [PATCH] Added j and k --- src/actions/commands/actions.ts | 35 +++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/actions/commands/actions.ts b/src/actions/commands/actions.ts index 1019ca95465..455573bc28d 100644 --- a/src/actions/commands/actions.ts +++ b/src/actions/commands/actions.ts @@ -2104,6 +2104,36 @@ class MoveToRightPane extends BaseCommand { } } +@RegisterAction +class MoveToLowerPane extends BaseCommand { + modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine]; + keys = [["", "j"], ["", ""], [""]]; + + public async exec(position: Position, vimState: VimState): Promise { + vimState.postponedCodeViewChanges.push({ + command: "workbench.action.navigateDown", + args: {} + }); + + return vimState; + } +} + +@RegisterAction +class MoveToUpperPane extends BaseCommand { + modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine]; + keys = [["", "k"], ["", ""], [""]]; + + public async exec(position: Position, vimState: VimState): Promise { + vimState.postponedCodeViewChanges.push({ + command: "workbench.action.navigateUp", + args: {} + }); + + return vimState; + } +} + @RegisterAction class MoveToLeftPane extends BaseCommand { modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine]; @@ -2119,14 +2149,15 @@ class MoveToLeftPane extends BaseCommand { } } + @RegisterAction class CycleThroughPanes extends BaseCommand { modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine]; - keys = ["", ""]; + keys = [["", ""], ["", "w"]]; public async exec(position: Position, vimState: VimState): Promise { vimState.postponedCodeViewChanges.push({ - command: "workbench.action.navigateRight", + command: "workbench.action.navigateEditorGroups", args: {} });