Hyper: select Up, Down, Left and Right panes

Created on 9 Oct 2016  路  16Comments  路  Source: vercel/hyper

right now its only prev/next pane, the same as tabs. Its enough for tabs, because tabs are one dimensional array.

But as far as panes are two dimensional feature, we need to navigate between them in all four sides: go to up/down/left/right pane.

help wanted Enhancement

Most helpful comment

Made with a plugin : https://github.com/chabou/hyper-pane
Feedback warmly welcome

All 16 comments

I was going to suggest numbers when I found this - I don't use prev/next for tabs, and the Ctrl-Option[-Shift]-Tab shortcut to do so for panes is particularly awkward.

Cmd-N to choose a tab and Option-(_numbers appear on panes_)-N to choose a pane would be great though.

I'm not suggesting it instead of directions, but directions instead of tabbing, and by-numbers available for panes too would be :+1:.

I like the iTerm2 shortcuts:

  • Cmd+left arrow, Cmd+right arrow navigates among tabs. So does Cmd-{ and Cmd-}.
  • Cmd+number navigates directly to a tab.
  • Cmd+Option+Number navigates directly to a window.
  • Cmd+Option+Arrow keys navigate among split panes.
  • Cmd+] and Cmd+[ navigates among split panes in order of use.

source: https://www.iterm2.com/documentation-one-page.html

I think the last point is the most important regarding UX

Cmd+] and Cmd+[ navigates among split panes in order of use

Now we need to use

selectNextPane: 'Ctrl+Alt+Tab',
selectPreviousPane: 'Ctrl+Shift+Alt+Tab'

I don't know about others, but for me this is difficult.

Just to add, under Windows 10, Ctrl + Alt + Tab is another alternative for Alt + Tab. It is a cross between Windows + Tab and Alt + Tab. It keeps the task switcher on the screen.

So, for me under Windows 10 (version 1511 build 10586.679), Ctrl + Alt +Tab brings up the task switcher and does not navigate between split panes.

hyper

Ctrl+Alt+Tab and Ctrl+Shift+Alt+Tab do not work under Gnome, as they're assigned by the window manager for switching panels.

If anyone is interested in releasing theirs to use Hyper, run dconf-editor and disable these two keybindings by overriding the defaults and configuring []:

image

I'm currently trying to achieve this navigation.
I think that the best keybindings to navigate are Ctrl+Alt+<Arrow> if we keep Ctrl+Alt+Tabfor moveNextPane() (Discussed here https://github.com/zeit/hyper/pull/1113)

This feature of navigation should be for example, starting from pane1 :
pane1 猬囷笍 pane2 猬囷笍 pane3 鉃★笍 pane4 鉃★笍 pane5 鉃★笍 pane7 猬嗭笍 pane6 猬咃笍 pane5 猬咃笍 pane1

capture d ecran 2017-01-01 a 14 41 15

We must keep a virtual position of a "focusPoint" in order to have 'pane5鉃★笍pane7' move because focus was on pane4 before pane5.

The rules of moving this point of focus would be:

  • When a pane is directly chosen (with a mouse click, for example), this focusPoint is set to the center of this pane. Same if a resize occurs. (Maybe after a delay too)
  • When a transition is made along x-axis

    • x-coord of focusPoint is set to the center of the next pane.

    • y-coord of foucsPoint is set to the center of the next pane ONLY if next pane border is totally included in previous pane border ('pane2猬囷笍pane3' but not 'pane4鉃★笍pane5')

  • Same behavior along y-axis
  • Next pane chosen is the first intersected by moving this point of focus on the desired direction.

    • If point of focus intersect 2 panes (when 'pane2猬囷笍' for exemple), priority is left or top pane.

For previous sequence, point of focus is moving like this:
focuspointmove

To achieve this, if will be simpler to have absolute frame (origin and size) of each TermGroup. These positions will be expressed in term of proportion. RootTermGroup's frame will be {x: 0, y: 0, w: 1, h: 1} and pane4 {x: 0.166, y: 0.666, w: 0.166, h: 0.333} in previous example.

As discussed here https://github.com/zeit/hyper/issues/1143, should it be a (core) plugin ? Even adding an absolute position of each TermGroup (which could be eventually useful for other features ?)

@matheuss @ekmartin @rauchg @CodeTheory @albinekb : can one of you, give me an advice where all of this should take place ? plugin, future core-plugin, PR...

Don't forget me ? Huh

Ouuups :) your advice is really welcome too, of course 馃槃

Would :heart: to see this implemented. Please consider making the keybindings configurable :tada:

Just went through this thread. I think indeed, #1295 is far more efficient.

And maybe easier to develop 馃槢

Haha, definitely :D

Made with a plugin : https://github.com/chabou/hyper-pane
Feedback warmly welcome

@chabou thanks for this

so, this issue can be closed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

keirlawson picture keirlawson  路  45Comments

0x80 picture 0x80  路  45Comments

rofazayn picture rofazayn  路  65Comments

xscheiner picture xscheiner  路  73Comments

silvenon picture silvenon  路  94Comments