Since October, Ctrl-Up and Ctrl-Down allows the user to scroll up and
down by single lines. The vi-copy mode provides an additional set of
bindings for this, to K and J.

Vi has had this feature bound to C-y and C-e for ages, so I've written a
patch to use these instead. Well, "instead" as far as the manpage is
concerned, but in reality K and J are still bound in the code, per
Nicholas's recommendation on IRC.

-- 
Micah J. Cowan
http://micah.cowan.name/
Index: mode-key.c
===================================================================
--- mode-key.c.orig
+++ mode-key.c
@@ -172,9 +172,11 @@
 	{ '\002' /* C-b */,	0, MODEKEYCOPY_PREVIOUSPAGE },
 	{ '\003' /* C-c */,	0, MODEKEYCOPY_CANCEL },
 	{ '\004' /* C-d */,	0, MODEKEYCOPY_HALFPAGEDOWN },
+	{ '\005' /* C-e */,	0, MODEKEYCOPY_SCROLLDOWN },
 	{ '\006' /* C-f */,	0, MODEKEYCOPY_NEXTPAGE },
 	{ '\010' /* C-h */,	0, MODEKEYCOPY_LEFT },
 	{ '\025' /* C-u */,	0, MODEKEYCOPY_HALFPAGEUP },
+	{ '\031' /* C-y */,	0, MODEKEYCOPY_SCROLLUP },
 	{ '\033' /* Escape */,	0, MODEKEYCOPY_CLEARSELECTION },
 	{ '\r',			0, MODEKEYCOPY_COPYSELECTION },
 	{ '^',			0, MODEKEYCOPY_BACKTOINDENTATION },
Index: tmux.1
===================================================================
--- tmux.1.orig
+++ tmux.1
@@ -535,7 +535,7 @@
 .Ic mode-keys
 option).
 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 Li "Back to indentation" Ta "^" Ta "M-m"
 .It Li "Clear selection" Ta "Escape" Ta "C-g"
@@ -559,8 +559,8 @@
 .It Li "Previous page" Ta "C-b" Ta "Page up"
 .It Li "Previous word" Ta "b" Ta "M-b"
 .It Li "Quit mode" Ta "q" Ta "Escape"
-.It Li "Scroll down" Ta "C-Down or J" Ta "C-Down"
-.It Li "Scroll up" Ta "C-Up or K" Ta "C-Up"
+.It Li "Scroll down" Ta "C-Down or C-e" Ta "C-Down"
+.It Li "Scroll up" Ta "C-Up or C-y" Ta "C-Up"
 .It Li "Search again" Ta "n" Ta "n"
 .It Li "Search backward" Ta "?" Ta "C-r"
 .It Li "Search forward" Ta "/" Ta "C-s"
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to