mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-14 07:49:01 +02:00
vi-style B, W and E keys in copy mode to navigate between words treating only
spaces as word separators. Also add . to the list of word separators for standard word navigation. From Micah Cowan, tweaked slightly by me.
This commit is contained in:
@ -91,9 +91,12 @@ struct mode_key_cmdstr mode_key_cmdstr_copy[] = {
|
||||
{ MODEKEYCOPY_LEFT, "cursor-left" },
|
||||
{ MODEKEYCOPY_MIDDLELINE, "middle-line" },
|
||||
{ MODEKEYCOPY_NEXTPAGE, "page-down" },
|
||||
{ MODEKEYCOPY_NEXTSPACE, "next-space" },
|
||||
{ MODEKEYCOPY_NEXTSPACEEND, "next-space-end" },
|
||||
{ MODEKEYCOPY_NEXTWORD, "next-word" },
|
||||
{ MODEKEYCOPY_NEXTWORDEND, "next-word-end" },
|
||||
{ MODEKEYCOPY_PREVIOUSPAGE, "page-up" },
|
||||
{ MODEKEYCOPY_PREVIOUSSPACE, "previous-space" },
|
||||
{ MODEKEYCOPY_PREVIOUSWORD, "previous-word" },
|
||||
{ MODEKEYCOPY_RIGHT, "cursor-right" },
|
||||
{ MODEKEYCOPY_SCROLLDOWN, "scroll-down" },
|
||||
@ -175,12 +178,15 @@ const struct mode_key_entry mode_key_vi_copy[] = {
|
||||
{ '0', 0, MODEKEYCOPY_STARTOFLINE },
|
||||
{ ':', 0, MODEKEYCOPY_GOTOLINE },
|
||||
{ '?', 0, MODEKEYCOPY_SEARCHUP },
|
||||
{ 'B', 0, MODEKEYCOPY_PREVIOUSSPACE },
|
||||
{ 'E', 0, MODEKEYCOPY_NEXTSPACEEND },
|
||||
{ 'G', 0, MODEKEYCOPY_HISTORYBOTTOM },
|
||||
{ 'H', 0, MODEKEYCOPY_TOPLINE },
|
||||
{ 'J', 0, MODEKEYCOPY_SCROLLDOWN },
|
||||
{ 'K', 0, MODEKEYCOPY_SCROLLUP },
|
||||
{ 'L', 0, MODEKEYCOPY_BOTTOMLINE },
|
||||
{ 'M', 0, MODEKEYCOPY_MIDDLELINE },
|
||||
{ 'W', 0, MODEKEYCOPY_NEXTSPACE },
|
||||
{ '\002' /* C-b */, 0, MODEKEYCOPY_PREVIOUSPAGE },
|
||||
{ '\003' /* C-c */, 0, MODEKEYCOPY_CANCEL },
|
||||
{ '\004' /* C-d */, 0, MODEKEYCOPY_HALFPAGEDOWN },
|
||||
|
Reference in New Issue
Block a user