mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-09-11 12:25:59 +03:00
Add actions for increasing/decreasing pane width/height with <C-w> +/-, >/< (#7138)
Fixes #2044
This commit is contained in:
parent
a7f71a1a53
commit
3a0f14d1f4
@ -1776,6 +1776,58 @@ class EvenPaneWidths extends BaseCommand {
|
||||
}
|
||||
}
|
||||
|
||||
@RegisterAction
|
||||
class IncreasePaneWidth extends BaseCommand {
|
||||
modes = [Mode.Normal, Mode.Visual, Mode.VisualLine];
|
||||
keys = ['<C-w>', '>'];
|
||||
|
||||
public override async exec(position: Position, vimState: VimState): Promise<void> {
|
||||
vimState.postponedCodeViewChanges.push({
|
||||
command: 'workbench.action.increaseViewWidth',
|
||||
args: {},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@RegisterAction
|
||||
class DecreasePaneWidth extends BaseCommand {
|
||||
modes = [Mode.Normal, Mode.Visual, Mode.VisualLine];
|
||||
keys = ['<C-w>', '<'];
|
||||
|
||||
public override async exec(position: Position, vimState: VimState): Promise<void> {
|
||||
vimState.postponedCodeViewChanges.push({
|
||||
command: 'workbench.action.decreaseViewWidth',
|
||||
args: {},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@RegisterAction
|
||||
class IncreasePaneHeight extends BaseCommand {
|
||||
modes = [Mode.Normal, Mode.Visual, Mode.VisualLine];
|
||||
keys = ['<C-w>', '+'];
|
||||
|
||||
public override async exec(position: Position, vimState: VimState): Promise<void> {
|
||||
vimState.postponedCodeViewChanges.push({
|
||||
command: 'workbench.action.increaseViewHeight',
|
||||
args: {},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@RegisterAction
|
||||
class DecreasePaneHeight extends BaseCommand {
|
||||
modes = [Mode.Normal, Mode.Visual, Mode.VisualLine];
|
||||
keys = ['<C-w>', '-'];
|
||||
|
||||
public override async exec(position: Position, vimState: VimState): Promise<void> {
|
||||
vimState.postponedCodeViewChanges.push({
|
||||
command: 'workbench.action.decreaseViewHeight',
|
||||
args: {},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@RegisterAction
|
||||
class CommandTabNext extends BaseCommand {
|
||||
modes = [Mode.Normal, Mode.Visual, Mode.VisualLine];
|
||||
|
Loading…
Reference in New Issue
Block a user