Implement <C-w> s (#3563)

* add ctrl_w_s to split horizontally

* updage roadmap

* update roadmap
This commit is contained in:
amin roosta 2019-04-14 14:09:29 +08:00 committed by Jason Poon
parent f003f80315
commit 514248c674
2 changed files with 17 additions and 0 deletions

View File

@ -526,6 +526,8 @@ Since the list is too long, now we just put those already supported options here
| :white_check_mark: :star: | &lt;ctrl-w&gt; hl | Switching between windows. | As we don't have the concept of Window in VS Code, we are mapping these commands to switching between Grouped Editors. |
| :white_check_mark: | :sp {file} | Split current window in two. | |
| :white_check_mark: :star: | :vsp {file} | Split vertically current window in two. | |
| :white_check_mark: | &lt;ctrl-w&gt; s | Split current window in two. | |
| :white_check_mark: :star: | &lt;ctrl-w&gt; v | Split vertically current window in two. | |
| :white_check_mark: | :new | Create a new window horizontally and start editing an empty file in it. | |
| :white_check_mark: :star: | :vne[w] | Create a new window vertically and start editing an empty file in it. | |

View File

@ -3055,6 +3055,21 @@ class VerticalSplit extends BaseCommand {
}
}
@RegisterAction
class OrthogonalSplit extends BaseCommand {
modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine];
keys = [['<C-w>', 's'], ['<C-w>', '<C-s>']];
public async exec(position: Position, vimState: VimState): Promise<VimState> {
vimState.postponedCodeViewChanges.push({
command: 'workbench.action.splitEditorOrthogonal',
args: {},
});
return vimState;
}
}
@RegisterAction
class EvenPaneWidths extends BaseCommand {
modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine];