Create close pane hotkey.

This commit is contained in:
Russell Myers 2019-04-15 21:16:54 -04:00
parent 11902020a5
commit 4949f14184
5 changed files with 13 additions and 0 deletions

View File

@ -222,6 +222,9 @@ export class SplitTabComponent extends BaseTabComponent implements OnInit, OnDes
case 'split-nav-down':
this.navigate('b')
break
case 'close-focus-pane':
this.removeTab(this.focusedTab)
break
}
})
}
@ -336,6 +339,8 @@ export class SplitTabComponent extends BaseTabComponent implements OnInit, OnDes
if (this.root.children.length === 0) {
this.destroy()
} else {
this.focusAnyIn(parent)
}
}

View File

@ -50,4 +50,5 @@ hotkeys:
- 'Ctrl-Alt-ArrowUp'
split-nav-left:
- 'Ctrl-Alt-ArrowLeft'
close-focus-pane: []
pluginBlacklist: ['ssh']

View File

@ -48,4 +48,6 @@ hotkeys:
- '⌘-⌥-ArrowUp'
split-nav-left:
- '⌘-⌥-ArrowLeft'
close-focus-pane:
- '⌘-Shift-W'
pluginBlacklist: ['ssh']

View File

@ -50,4 +50,5 @@ hotkeys:
- 'Ctrl-Alt-ArrowUp'
split-nav-left:
- 'Ctrl-Alt-ArrowLeft'
close-focus-pane: []
pluginBlacklist: []

View File

@ -109,6 +109,10 @@ export class AppHotkeyProvider extends HotkeyProvider {
id: 'split-nav-right',
name: 'Focus the pane on the right',
},
{
id: 'close-focus-pane',
name: 'Close focused pane',
},
]
async provide (): Promise<IHotkeyDescription[]> {