mirror of
https://github.com/Eugeny/tabby
synced 2024-12-04 18:40:16 +00:00
feat(hotkey): add the delete entire line hotkey
This commit is contained in:
parent
500a42c1f7
commit
389e05c832
3 changed files with 12 additions and 0 deletions
|
@ -244,6 +244,11 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
|
|||
}[this.hostApp.platform])
|
||||
})
|
||||
break
|
||||
case 'delete-line':
|
||||
this.forEachFocusedTerminalPane(tab => {
|
||||
tab.sendInput('\x1bw')
|
||||
})
|
||||
break
|
||||
case 'delete-previous-word':
|
||||
this.forEachFocusedTerminalPane(tab => {
|
||||
tab.sendInput('\x1b\x7f')
|
||||
|
|
|
@ -104,6 +104,7 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||
'previous-word': ['⌥-Left'],
|
||||
'next-word': ['⌥-Right'],
|
||||
'delete-previous-word': ['⌥-Backspace'],
|
||||
'delete-line': ['⌘-Backspace'],
|
||||
'delete-next-word': ['⌥-Delete'],
|
||||
search: [
|
||||
'⌘-F',
|
||||
|
@ -147,6 +148,7 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||
'previous-word': ['Ctrl-Left'],
|
||||
'next-word': ['Ctrl-Right'],
|
||||
'delete-previous-word': ['Ctrl-Backspace'],
|
||||
'delete-line': ['Ctrl-Shift-Backspace'],
|
||||
'delete-next-word': ['Ctrl-Delete'],
|
||||
search: [
|
||||
'Ctrl-Shift-F',
|
||||
|
@ -188,6 +190,7 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||
'previous-word': ['Ctrl-Left'],
|
||||
'next-word': ['Ctrl-Right'],
|
||||
'delete-previous-word': ['Ctrl-Backspace'],
|
||||
'delete-line': ['Ctrl-Shift-Backspace'],
|
||||
'delete-next-word': ['Ctrl-Delete'],
|
||||
search: [
|
||||
'Ctrl-Shift-F',
|
||||
|
|
|
@ -33,6 +33,10 @@ export class TerminalHotkeyProvider extends HotkeyProvider {
|
|||
id: 'delete-previous-word',
|
||||
name: this.translate.instant('Delete previous word'),
|
||||
},
|
||||
{
|
||||
id: 'delete-line',
|
||||
name: this.translate.instant('Delete entire line'),
|
||||
},
|
||||
{
|
||||
id: 'delete-next-word',
|
||||
name: this.translate.instant('Delete next word'),
|
||||
|
|
Loading…
Reference in a new issue