Add Home and End for 0 and $ respectively

This commit is contained in:
Jakob Schöttl 2016-04-25 19:19:29 +02:00
parent ff93b3e28d
commit a37c385b35
3 changed files with 6 additions and 4 deletions

View File

@ -106,11 +106,11 @@ SELECTION MODE
+-----------------------------------+-----------------------------------------------------------+
| ``B`` or ``ctrl-left`` | backward WORD (non-whitespace) |
+-----------------------------------+-----------------------------------------------------------+
| ``0`` | move cursor to the first column in the row |
| ``0`` or ``home`` | move cursor to the first column in the row |
+-----------------------------------+-----------------------------------------------------------+
| ``^`` | beginning-of-line (first non-blank character) |
+-----------------------------------+-----------------------------------------------------------+
| ``$`` | end-of-line |
| ``$`` or ``end`` | end-of-line |
+-----------------------------------+-----------------------------------------------------------+
| ``g`` | jump to start of first row |
+-----------------------------------+-----------------------------------------------------------+

View File

@ -95,11 +95,11 @@ backward word
forward \fIWORD\fP (non-whitespace)
.IP "\fBB\fP or \fBctrl-left\fP"
backward \fIWORD\fP (non-whitespace)
.IP "\fB0\fP"
.IP "\fB0\fP or \fBhome\fP"
move cursor to the first column in the row\fP"
.IP "\fB^\fP"
beginning-of-line (first non-blank character)
.IP "\fB$\fP"
.IP "\fB$\fP or \fBend\fP"
end-of-line
.IP "\fBg\fP"
jump to start of first row

View File

@ -842,6 +842,7 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, keybind_info *info)
move_forward_blank_word(vte, &info->select);
break;
case GDK_KEY_0:
case GDK_KEY_Home:
set_cursor_column(vte, &info->select, 0);
break;
case GDK_KEY_asciicircum:
@ -849,6 +850,7 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, keybind_info *info)
move_first(vte, &info->select, std::not1(std::ref(g_unichar_isspace)));
break;
case GDK_KEY_dollar:
case GDK_KEY_End:
move_to_eol(vte, &info->select);
break;
case GDK_KEY_g: