Merge pull request #228 from mattikus/add_q_escape

Add q to escape from selection mode
This commit is contained in:
Simon Gomizelj 2015-05-24 23:53:31 -04:00
commit 1ac9d1d850
3 changed files with 63 additions and 62 deletions

View File

@ -78,67 +78,67 @@ INSERT MODE
SELECTION MODE
--------------
+--------------------------+-----------------------------------------------------------+
| ``escape`` or ``ctrl-[`` | enter insert mode |
+--------------------------+-----------------------------------------------------------+
| ``x`` | activate url hints mode |
+--------------------------+-----------------------------------------------------------+
| ``v`` | visual mode |
+--------------------------+-----------------------------------------------------------+
| ``V`` | visual line mode |
+--------------------------+-----------------------------------------------------------+
| ``ctrl-v`` | visual block mode |
+--------------------------+-----------------------------------------------------------+
| ``hjkl`` or arrow keys | move cursor left/down/up/right |
+--------------------------+-----------------------------------------------------------+
| ``w`` or ``shift-right`` | forward word |
+--------------------------+-----------------------------------------------------------+
| ``b`` or ``shift-left`` | backward word |
+--------------------------+-----------------------------------------------------------+
| ``W`` or ``ctrl-right`` | forward WORD (non-whitespace) |
+--------------------------+-----------------------------------------------------------+
| ``B`` or ``ctrl-left`` | backward WORD (non-whitespace) |
+--------------------------+-----------------------------------------------------------+
| ``0`` | move cursor to the first column in the row |
+--------------------------+-----------------------------------------------------------+
| ``^`` | beginning-of-line (first non-blank character) |
+--------------------------+-----------------------------------------------------------+
| ``$`` | end-of-line |
+--------------------------+-----------------------------------------------------------+
| ``g`` | jump to start of first row |
+--------------------------+-----------------------------------------------------------+
| ``G`` | jump to start of last row |
+--------------------------+-----------------------------------------------------------+
| ``ctrl-u`` | move cursor a half screen up |
+--------------------------+-----------------------------------------------------------+
| ``ctrl-d`` | move cursor a half screen down |
+--------------------------+-----------------------------------------------------------+
| ``ctrl-b`` | move cursor a full screen up (back) |
+--------------------------+-----------------------------------------------------------+
| ``ctrl-f`` | move cursor a full screen down (forward) |
+--------------------------+-----------------------------------------------------------+
| ``y`` | copy to CLIPBOARD |
+--------------------------+-----------------------------------------------------------+
| ``/`` | forward search |
+--------------------------+-----------------------------------------------------------+
| ``?`` | reverse search |
+--------------------------+-----------------------------------------------------------+
| ``u`` | forward url search |
+--------------------------+-----------------------------------------------------------+
| ``U`` | reverse url search |
+--------------------------+-----------------------------------------------------------+
| ``o`` | open the current selection as a url |
+--------------------------+-----------------------------------------------------------+
| ``Return`` | open the current selection as a url and enter insert mode |
+--------------------------+-----------------------------------------------------------+
| ``n`` | next search match |
+--------------------------+-----------------------------------------------------------+
| ``N`` | previous search match |
+--------------------------+-----------------------------------------------------------+
| ``+`` | increase font size |
+--------------------------+-----------------------------------------------------------+
| ``-`` | decrease font size |
+--------------------------+-----------------------------------------------------------+
+-----------------------------------+-----------------------------------------------------------+
| ``q`` or ``escape`` or ``ctrl-[`` | enter insert mode |
+-----------------------------------+-----------------------------------------------------------+
| ``x`` | activate url hints mode |
+-----------------------------------+-----------------------------------------------------------+
| ``v`` | visual mode |
+-----------------------------------+-----------------------------------------------------------+
| ``V`` | visual line mode |
+-----------------------------------+-----------------------------------------------------------+
| ``ctrl-v`` | visual block mode |
+-----------------------------------+-----------------------------------------------------------+
| ``hjkl`` or arrow keys | move cursor left/down/up/right |
+-----------------------------------+-----------------------------------------------------------+
| ``w`` or ``shift-right`` | forward word |
+-----------------------------------+-----------------------------------------------------------+
| ``b`` or ``shift-left`` | backward word |
+-----------------------------------+-----------------------------------------------------------+
| ``W`` or ``ctrl-right`` | forward WORD (non-whitespace) |
+-----------------------------------+-----------------------------------------------------------+
| ``B`` or ``ctrl-left`` | backward WORD (non-whitespace) |
+-----------------------------------+-----------------------------------------------------------+
| ``0`` | move cursor to the first column in the row |
+-----------------------------------+-----------------------------------------------------------+
| ``^`` | beginning-of-line (first non-blank character) |
+-----------------------------------+-----------------------------------------------------------+
| ``$`` | end-of-line |
+-----------------------------------+-----------------------------------------------------------+
| ``g`` | jump to start of first row |
+-----------------------------------+-----------------------------------------------------------+
| ``G`` | jump to start of last row |
+-----------------------------------+-----------------------------------------------------------+
| ``ctrl-u`` | move cursor a half screen up |
+-----------------------------------+-----------------------------------------------------------+
| ``ctrl-d`` | move cursor a half screen down |
+-----------------------------------+-----------------------------------------------------------+
| ``ctrl-b`` | move cursor a full screen up (back) |
+-----------------------------------+-----------------------------------------------------------+
| ``ctrl-f`` | move cursor a full screen down (forward) |
+-----------------------------------+-----------------------------------------------------------+
| ``y`` | copy to CLIPBOARD |
+-----------------------------------+-----------------------------------------------------------+
| ``/`` | forward search |
+-----------------------------------+-----------------------------------------------------------+
| ``?`` | reverse search |
+-----------------------------------+-----------------------------------------------------------+
| ``u`` | forward url search |
+-----------------------------------+-----------------------------------------------------------+
| ``U`` | reverse url search |
+-----------------------------------+-----------------------------------------------------------+
| ``o`` | open the current selection as a url |
+-----------------------------------+-----------------------------------------------------------+
| ``Return`` | open the current selection as a url and enter insert mode |
+-----------------------------------+-----------------------------------------------------------+
| ``n`` | next search match |
+-----------------------------------+-----------------------------------------------------------+
| ``N`` | previous search match |
+-----------------------------------+-----------------------------------------------------------+
| ``+`` | increase font size |
+-----------------------------------+-----------------------------------------------------------+
| ``-`` | decrease font size |
+-----------------------------------+-----------------------------------------------------------+
During scrollback search, the current selection is changed to the search match
and copied to the PRIMARY clipboard buffer.

View File

@ -75,7 +75,7 @@ and the visual representation of the programs running within it. You can
search, mark and copy contents from the display for use in other
programs.
.PP
.IP "\fBescape\fP or \fBctrl-[\fP"
.IP "\fBq\fP or \fBescape\fP or \fBctrl-[\fP"
enter insert mode
.IP "\fBx\fP"
activate url hints mode

View File

@ -749,6 +749,7 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, keybind_info *info)
}
switch (event->keyval) {
case GDK_KEY_Escape:
case GDK_KEY_q:
exit_command_mode(vte, &info->select);
gtk_widget_hide(info->panel.da);
gtk_widget_hide(info->panel.panel);