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 SELECTION MODE
-------------- --------------
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``escape`` or ``ctrl-[`` | enter insert mode | | ``q`` or ``escape`` or ``ctrl-[`` | enter insert mode |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``x`` | activate url hints mode | | ``x`` | activate url hints mode |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``v`` | visual mode | | ``v`` | visual mode |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``V`` | visual line mode | | ``V`` | visual line mode |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``ctrl-v`` | visual block mode | | ``ctrl-v`` | visual block mode |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``hjkl`` or arrow keys | move cursor left/down/up/right | | ``hjkl`` or arrow keys | move cursor left/down/up/right |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``w`` or ``shift-right`` | forward word | | ``w`` or ``shift-right`` | forward word |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``b`` or ``shift-left`` | backward word | | ``b`` or ``shift-left`` | backward word |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``W`` or ``ctrl-right`` | forward WORD (non-whitespace) | | ``W`` or ``ctrl-right`` | forward WORD (non-whitespace) |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``B`` or ``ctrl-left`` | backward WORD (non-whitespace) | | ``B`` or ``ctrl-left`` | backward WORD (non-whitespace) |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``0`` | move cursor to the first column in the row | | ``0`` | move cursor to the first column in the row |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``^`` | beginning-of-line (first non-blank character) | | ``^`` | beginning-of-line (first non-blank character) |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``$`` | end-of-line | | ``$`` | end-of-line |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``g`` | jump to start of first row | | ``g`` | jump to start of first row |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``G`` | jump to start of last row | | ``G`` | jump to start of last row |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``ctrl-u`` | move cursor a half screen up | | ``ctrl-u`` | move cursor a half screen up |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``ctrl-d`` | move cursor a half screen down | | ``ctrl-d`` | move cursor a half screen down |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``ctrl-b`` | move cursor a full screen up (back) | | ``ctrl-b`` | move cursor a full screen up (back) |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``ctrl-f`` | move cursor a full screen down (forward) | | ``ctrl-f`` | move cursor a full screen down (forward) |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``y`` | copy to CLIPBOARD | | ``y`` | copy to CLIPBOARD |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``/`` | forward search | | ``/`` | forward search |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``?`` | reverse search | | ``?`` | reverse search |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``u`` | forward url search | | ``u`` | forward url search |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``U`` | reverse url search | | ``U`` | reverse url search |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``o`` | open the current selection as a url | | ``o`` | open the current selection as a url |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``Return`` | open the current selection as a url and enter insert mode | | ``Return`` | open the current selection as a url and enter insert mode |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``n`` | next search match | | ``n`` | next search match |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``N`` | previous search match | | ``N`` | previous search match |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``+`` | increase font size | | ``+`` | increase font size |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
| ``-`` | decrease font size | | ``-`` | decrease font size |
+--------------------------+-----------------------------------------------------------+ +-----------------------------------+-----------------------------------------------------------+
During scrollback search, the current selection is changed to the search match During scrollback search, the current selection is changed to the search match
and copied to the PRIMARY clipboard buffer. 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 search, mark and copy contents from the display for use in other
programs. programs.
.PP .PP
.IP "\fBescape\fP or \fBctrl-[\fP" .IP "\fBq\fP or \fBescape\fP or \fBctrl-[\fP"
enter insert mode enter insert mode
.IP "\fBx\fP" .IP "\fBx\fP"
activate url hints mode activate url hints mode

View File

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