Skip to content

Commit

Permalink
Merge pull request #1066 from xconverge/ctrl-w-ctrl-w
Browse files Browse the repository at this point in the history
fixes #1064
  • Loading branch information
rebornix authored Nov 19, 2016
2 parents 7241d00 + 10cea48 commit 10a32a9
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/actions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2886,7 +2886,8 @@ class MoveRightWithSpace extends BaseMovement {
@RegisterAction
class MoveToRightPane extends BaseCommand {
modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine];
keys = ["<C-w>", "l"];
keys = [["<C-w>", "l"],
["<C-w>", "<right>"]];

public async exec(position: Position, vimState: VimState): Promise<VimState> {
vimState.postponedCodeViewChanges.push({
Expand All @@ -2901,7 +2902,8 @@ class MoveToRightPane extends BaseCommand {
@RegisterAction
class MoveToLeftPane extends BaseCommand {
modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine];
keys = ["<C-w>", "h"];
keys = [["<C-w>", "h"],
["<C-w>", "<left>"]];

public async exec(position: Position, vimState: VimState): Promise<VimState> {
vimState.postponedCodeViewChanges.push({
Expand All @@ -2913,6 +2915,21 @@ class MoveToLeftPane extends BaseCommand {
}
}

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

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

return vimState;
}
}

class BaseTabCommand extends BaseCommand {
modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine];
runsOnceForEachCountPrefix = true;
Expand Down

0 comments on commit 10a32a9

Please sign in to comment.