Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement view transpose #2461

Merged
merged 1 commit into from
May 20, 2022

Conversation

zen3ger
Copy link
Contributor

@zen3ger zen3ger commented May 11, 2022

Change the layout of existing split view from horizontal to vertical and
vica-versa. It only effects the focused view and its siblings, i.e. not
recursive.

Command is mapped to 't' or 'C-t' under the Window menus.

Change the layout of existing split view from horizontal to vertical and
vica-versa. It only effects the focused view and its siblings, i.e. not
recursive.

Command is mapped to 't' or 'C-t' under the Window menus.
@pickfire
Copy link
Contributor

Is this feature good to have? I don't think I have seen this in other editors and also not sure what is the use case.

@zen3ger
Copy link
Contributor Author

zen3ger commented May 14, 2022

I'd say it has it's uses, and it's definitely useful with support for swapping views so you can quickly rearrange what you are working with without closing splits.

For example, if you have something in a vsplit which you realize you'd need it in a hsplit to be able to read the whole thing (log files don't tend to keep the 80 char limit...) then currently it's C-w C-q C-w C-s SPC b then type the buffer name to get there.

It's probably more of a convenience feature than a must have.

@heliostatic
Copy link
Contributor

I do use this in tmux to cycle through split layouts. Agree that it's a nice to have, but it would indeed be nice.

@the-mikedavis the-mikedavis added the S-waiting-on-review Status: Awaiting review from a maintainer. label May 18, 2022
@archseer archseer merged commit 8958bf0 into helix-editor:master May 20, 2022
@@ -360,6 +360,7 @@ impl MappableCommand {
jump_view_left, "Jump to the split to the left",
jump_view_up, "Jump to the split above",
jump_view_down, "Jump to the split below",
transpose_view, "Transpose splits",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great feature! Thank you for adding it

I must say when I read the words "transpose view" I assumed it would swap the contents of two windows, not swap from a horizontal split to a vertical split. However, reading the description "transpose splits" made it immediately clear.

@zen3ger zen3ger deleted the feature-transpose-views branch May 20, 2022 06:26
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 15, 2022
Change the layout of existing split view from horizontal to vertical and
vica-versa. It only effects the focused view and its siblings, i.e. not
recursive.

Command is mapped to 't' or 'C-t' under the Window menus.
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 15, 2022
Change the layout of existing split view from horizontal to vertical and
vica-versa. It only effects the focused view and its siblings, i.e. not
recursive.

Command is mapped to 't' or 'C-t' under the Window menus.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants