summaryrefslogtreecommitdiffstats
path: root/zshinput
diff options
context:
space:
mode:
authorJesse Luehrs <jesse.luehrs@stripe.com>2015-02-22 15:44:58 -0800
committerJesse Luehrs <doy@tozt.net>2015-02-22 16:06:19 -0800
commitd1415c68c0ad7ac244aedaa9358215caf30c0dc8 (patch)
tree0ba2174a337a1d35734f42b09846e6fafb9b736d /zshinput
parent71924416fa078c1aaa896c45b121d65c6e499067 (diff)
downloadconf-d1415c68c0ad7ac244aedaa9358215caf30c0dc8.tar.gz
conf-d1415c68c0ad7ac244aedaa9358215caf30c0dc8.zip
page up in zsh should forward to tmux
Diffstat (limited to 'zshinput')
-rw-r--r--zshinput15
1 files changed, 15 insertions, 0 deletions
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