Use C-e and C-y for scrolling in vi mode, from Micah Cowan.

This commit is contained in:
Nicholas Marriott 2010-01-23 17:49:21 +00:00
parent 097a501414
commit 8865eb2866
2 changed files with 5 additions and 3 deletions

View File

@ -172,9 +172,11 @@ const struct mode_key_entry mode_key_vi_copy[] = {
{ '\002' /* C-b */, 0, MODEKEYCOPY_PREVIOUSPAGE }, { '\002' /* C-b */, 0, MODEKEYCOPY_PREVIOUSPAGE },
{ '\003' /* C-c */, 0, MODEKEYCOPY_CANCEL }, { '\003' /* C-c */, 0, MODEKEYCOPY_CANCEL },
{ '\004' /* C-d */, 0, MODEKEYCOPY_HALFPAGEDOWN }, { '\004' /* C-d */, 0, MODEKEYCOPY_HALFPAGEDOWN },
{ '\005' /* C-e */, 0, MODEKEYCOPY_SCROLLDOWN },
{ '\006' /* C-f */, 0, MODEKEYCOPY_NEXTPAGE }, { '\006' /* C-f */, 0, MODEKEYCOPY_NEXTPAGE },
{ '\010' /* C-h */, 0, MODEKEYCOPY_LEFT }, { '\010' /* C-h */, 0, MODEKEYCOPY_LEFT },
{ '\025' /* C-u */, 0, MODEKEYCOPY_HALFPAGEUP }, { '\025' /* C-u */, 0, MODEKEYCOPY_HALFPAGEUP },
{ '\031' /* C-y */, 0, MODEKEYCOPY_SCROLLUP },
{ '\033' /* Escape */, 0, MODEKEYCOPY_CLEARSELECTION }, { '\033' /* Escape */, 0, MODEKEYCOPY_CLEARSELECTION },
{ '\r', 0, MODEKEYCOPY_COPYSELECTION }, { '\r', 0, MODEKEYCOPY_COPYSELECTION },
{ '^', 0, MODEKEYCOPY_BACKTOINDENTATION }, { '^', 0, MODEKEYCOPY_BACKTOINDENTATION },

6
tmux.1
View File

@ -535,7 +535,7 @@ The keys available depend on whether emacs or vi mode is selected
.Ic mode-keys .Ic mode-keys
option). option).
The following keys are supported as appropriate for the mode: The following keys are supported as appropriate for the mode:
.Bl -column "FunctionXXXXXXXXXXXX" "viXXXXXXXXX" "emacs" -offset indent .Bl -column "FunctionXXXXXXXXXXXX" "viXXXXXXXXXX" "emacs" -offset indent
.It Sy "Function" Ta Sy "vi" Ta Sy "emacs" .It Sy "Function" Ta Sy "vi" Ta Sy "emacs"
.It Li "Back to indentation" Ta "^" Ta "M-m" .It Li "Back to indentation" Ta "^" Ta "M-m"
.It Li "Clear selection" Ta "Escape" Ta "C-g" .It Li "Clear selection" Ta "Escape" Ta "C-g"
@ -559,8 +559,8 @@ The following keys are supported as appropriate for the mode:
.It Li "Previous page" Ta "C-b" Ta "Page up" .It Li "Previous page" Ta "C-b" Ta "Page up"
.It Li "Previous word" Ta "b" Ta "M-b" .It Li "Previous word" Ta "b" Ta "M-b"
.It Li "Quit mode" Ta "q" Ta "Escape" .It Li "Quit mode" Ta "q" Ta "Escape"
.It Li "Scroll down" Ta "C-Down or J" Ta "C-Down" .It Li "Scroll down" Ta "C-Down or C-e" Ta "C-Down"
.It Li "Scroll up" Ta "C-Up or K" Ta "C-Up" .It Li "Scroll up" Ta "C-Up or C-y" Ta "C-Up"
.It Li "Search again" Ta "n" Ta "n" .It Li "Search again" Ta "n" Ta "n"
.It Li "Search backward" Ta "?" Ta "C-r" .It Li "Search backward" Ta "?" Ta "C-r"
.It Li "Search forward" Ta "/" Ta "C-s" .It Li "Search forward" Ta "/" Ta "C-s"