Skip to content

Commit

Permalink
Add Ctrl+Backspace keybind to delete word
Browse files Browse the repository at this point in the history
  • Loading branch information
pol-rivero committed Jan 2, 2025
1 parent fa89055 commit ef0e4c0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
9 changes: 8 additions & 1 deletion doc/terminator_config.5
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,13 @@ Reset the terminal state and clear the terminal window.
Default value: \fB<Ctrl><Shift>G\fP
.RE
.sp
\fBdelete_word\fP
.RS 4
Delete the word before the cursor.
.br
Default value: \fB<Ctrl>BackSpace\fP
.RE
.sp
\fBzoom_in\fP
.RS 4
Increase the font size by one unit.
Expand Down Expand Up @@ -1356,4 +1363,4 @@ individual plugins for more information.
.SH "SEE ALSO"
.sp
\fBterminator\fP(1), \c
.URL "https://configobj.readthedocs.io/" "" ""
.URL "https://configobj.readthedocs.io/" "" ""
4 changes: 4 additions & 0 deletions doc/terminator_config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,10 @@ Default value: *<Ctrl><Shift>R*
Reset the terminal state and clear the terminal window. +
Default value: *<Ctrl><Shift>G*

*delete_word*::
Delete the word before the cursor. +
Default value: *<Ctrl>BackSpace*

*zoom_in*::
Increase the font size by one unit. +
Default value: *<Ctrl>plus*
Expand Down
1 change: 1 addition & 0 deletions terminatorlib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
'full_screen' : 'F11',
'reset' : '<Shift><Control>r',
'reset_clear' : '<Shift><Control>g',
'delete_word' : '<Control>BackSpace',
'hide_window' : '<Shift><Control><Alt>a',
'create_group' : '',
'group_all' : '<Super>g',
Expand Down
1 change: 1 addition & 0 deletions terminatorlib/prefseditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ class PrefsEditor:
'full_screen' : _('Toggle fullscreen'),
'reset' : _('Reset the terminal'),
'reset_clear' : _('Reset and clear the terminal'),
'delete_word' : _('Delete the word before the cursor'),
'hide_window' : _('Toggle window visibility'),
'create_group' : _('Create new group'),
'group_all' : _('Group all terminals'),
Expand Down
3 changes: 3 additions & 0 deletions terminatorlib/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -2031,6 +2031,9 @@ def key_reset(self):
def key_reset_clear(self):
self.vte.reset (True, True)

def key_delete_word(self):
self.feed([27, 127])

def key_create_group(self):
self.titlebar.create_group()

Expand Down

0 comments on commit ef0e4c0

Please sign in to comment.