vercel / hyper

A terminal built on web technologies
https://hyper.is
MIT License
43.27k stars 3.52k forks source link

Request: add "tab:close" shortcut #3548

Open mikemaccana opened 5 years ago

mikemaccana commented 5 years ago

Per https://github.com/zeit/hyper/blob/master/app/keymaps/win32.json, there is no shortcut to close tabs.

Adding "tab:close": "ctrl+w", to keymaps doesn't work.

Could you please add a "tab: close" shortcut?

Hyper 3 Canary 8, Windows 10.0.18860.0, can't see this reported in any other issue.

p0x6 commented 5 years ago

I'm down to take a look at this. should there be a "tab: close" shortcut for all platforms?

p0x6 commented 5 years ago

what would be the difference between pane:close and tab:close?

eromoe commented 5 years ago

In addition, ctrl+w should not close main windows .

I mean, "pane:close": "ctrl+w"works on Windows, but it would close main window if there is no other tab . This should be avoid.

p0x6 commented 5 years ago

so both pane:close and tab:close should not close windows? if so, that's a pretty big behavioral change imo. thoughts?

eromoe commented 5 years ago

I mean should not close the last one. If you have many tab, you want to close all of them except one by crazily type ctrl+w . Then how do you feel when you found hyper quit all windows ? This is the problem .

Or, provide a way for close other tab/pane .

PS: I also found ctrl + d would quit hyper , how to disable this ?

ppot commented 5 years ago

There is no tab:close since there is no actual tab. The first implementation done was to agregate session based on a root pane. The issue there is that theses are not tab and you can't traveltree in order to invalidate and close all sessions at the same time as the Tab. I'm currently reworking the whole codebase but it will introduce breaking changes. However better codebase and structure from an architectural standpoint.

p0x6 commented 5 years ago

got it. thanks for the clarification.

mikemaccana commented 5 years ago

@glyif-wonder It looks like pane:close does what I want. A pity it took this PR to find it!