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

Horizontal and vertical window splitting are reversed #213

Closed
ThomS8312 opened this issue Nov 25, 2015 · 9 comments
Closed

Horizontal and vertical window splitting are reversed #213

ThomS8312 opened this issue Nov 25, 2015 · 9 comments

Comments

@ThomS8312
Copy link

@ThomS8312 ThomS8312 commented Nov 25, 2015

The split-window -h command splits the window vertically instead of horizontally, and split-window -v splits it horizontally instead of vertically.

@nicm

This comment has been minimized.

Copy link
Member

@nicm nicm commented Nov 25, 2015

Haha.

@nicm nicm closed this Nov 25, 2015
@ThomS8312

This comment has been minimized.

Copy link
Author

@ThomS8312 ThomS8312 commented Nov 25, 2015

I don't understand the response...can you explain?

@nicm

This comment has been minimized.

Copy link
Member

@nicm nicm commented Nov 25, 2015

It's fine as it is.

@ailin-nemui

This comment has been minimized.

Copy link

@ailin-nemui ailin-nemui commented Nov 25, 2015

Some people/editors think of "horizontal" as "the split results in a windows vertically split, so the dividing line looks like the horizon"

@rfrancoise

This comment has been minimized.

Copy link

@rfrancoise rfrancoise commented Nov 25, 2015

To avoid this (very common) confusion, in Emacs the functions were renamed: split-window-vertically became split-window-below and split-window-horizontally became split-window-right.

@ThomS8312

This comment has been minimized.

Copy link
Author

@ThomS8312 ThomS8312 commented Nov 25, 2015

You mean that's intentional? The man page states:

...Create a new pane by splitting target-pane: -h does a horizontal split
and -v a vertical split...

The "split" is the line dividing the window. Either that line goes left to right (like the x-axis, which is a horizontal division/"split") or up and down (like the y-axis, which is a vertical division/"split").

Horizontal is defined as "parallel to the plane of the horizon; level; flat" and vertical is "at right angles to the horizon; perpendicular; upright". Those are dictionary definitions (British Dictionary). Tmux even has the "h" and the "v" as the letters for those options making it even more misleading. They go directly against the meaning of the words they are supposed to represent.

Why the reluctance in making these commands match their definition?

@nicm

This comment has been minimized.

Copy link
Member

@nicm nicm commented Nov 25, 2015

You are misinformed. The "split" is not the line dividing the window, and neither we nor the dictionary define it as so. "Split" means the act of splitting the window into two. When you split horizontally, you divide into two along the horizontal axis; vertically, along the vertical axis. The meaning of these flags is not going to change.

@ThomS8312

This comment has been minimized.

Copy link
Author

@ThomS8312 ThomS8312 commented Nov 25, 2015

I see. A "line" created on the x-axis will be vertical and a "line" created on the y-axis will be horizontal.

Neither of us is "wrong", but since my perspective is very common, it's reflective of what's normally expected even though your perspective is correct at a technical level. My perspective sees it in the same sense as a horizontal/vertical incision, so the split (line) wouldn't go along the axis, the split would be a representation of the axis itself.

Tmux's method, though correct, goes against the grain compared to other terminal splitting applications I'm used to. Without knowing the reason behind tmux's behavior, it's easy to conclude that something is wrong.

@cipri-tom

This comment has been minimized.

Copy link

@cipri-tom cipri-tom commented Apr 3, 2017

I searched everywhere why split-window -h doesn't do a "horizontal" split ... Until I thought of checking the -v part and saw they are "reversed".

The emacs renaming is a good, less confusing, choice of words

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants
You can’t perform that action at this time.