From d1415c68c0ad7ac244aedaa9358215caf30c0dc8 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 22 Feb 2015 15:44:58 -0800 Subject: page up in zsh should forward to tmux --- zshinput | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'zshinput') diff --git a/zshinput b/zshinput index 71685b7..642afe0 100644 --- a/zshinput +++ b/zshinput @@ -28,3 +28,18 @@ bindkey "^H" backward-delete-char bindkey "^U" backward-kill-line bindkey "^[[3~" delete-char + +page-up-within-tmux() { + if [[ $TMUX == '' ]]; then + # no-op; default behavior isn't useful, and anyway you don't want to do + # something TOO cool here since you won't be able to do it inside tmux. + # TODO if there's any way to command the /emu/ to scroll up one page, i + # would love to hear about it + else + tmux copy-mode -u + fi +} +zle -N page-up-within-tmux + +# page up +bindkey "${terminfo[kpp]}" page-up-within-tmux -- cgit v1.2.3-54-g00ecf