Skip to content

Commit

Permalink
Merge pull request #1666 from Chillee/1585
Browse files Browse the repository at this point in the history
Fixes #1585: Added <C-w> j and <C-w> k
  • Loading branch information
xconverge committed May 6, 2017
2 parents aee8907 + 3ae5212 commit 1a216fc
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions src/actions/commands/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2104,6 +2104,36 @@ class MoveToRightPane extends BaseCommand {
}
}

@RegisterAction
class MoveToLowerPane extends BaseCommand {
modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine];
keys = [["<C-w>", "j"], ["<C-w>", "<down>"], ["<C-w j>"]];

public async exec(position: Position, vimState: VimState): Promise<VimState> {
vimState.postponedCodeViewChanges.push({
command: "workbench.action.navigateDown",
args: {}
});

return vimState;
}
}

@RegisterAction
class MoveToUpperPane extends BaseCommand {
modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine];
keys = [["<C-w>", "k"], ["<C-w>", "<up>"], ["<C-w k>"]];

public async exec(position: Position, vimState: VimState): Promise<VimState> {
vimState.postponedCodeViewChanges.push({
command: "workbench.action.navigateUp",
args: {}
});

return vimState;
}
}

@RegisterAction
class MoveToLeftPane extends BaseCommand {
modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine];
Expand All @@ -2119,14 +2149,15 @@ class MoveToLeftPane extends BaseCommand {
}
}


@RegisterAction
class CycleThroughPanes extends BaseCommand {
modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine];
keys = ["<C-w>", "<C-w>"];
keys = [["<C-w>", "<C-w>"], ["<C-w>", "w"]];

public async exec(position: Position, vimState: VimState): Promise<VimState> {
vimState.postponedCodeViewChanges.push({
command: "workbench.action.navigateRight",
command: "workbench.action.navigateEditorGroups",
args: {}
});

Expand Down

0 comments on commit 1a216fc

Please sign in to comment.