diff options
author | Jesse Luehrs <jesse.luehrs@stripe.com> | 2015-02-22 15:44:58 -0800 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2015-02-22 16:06:19 -0800 |
commit | d1415c68c0ad7ac244aedaa9358215caf30c0dc8 (patch) | |
tree | 0ba2174a337a1d35734f42b09846e6fafb9b736d /zshinput | |
parent | 71924416fa078c1aaa896c45b121d65c6e499067 (diff) | |
download | conf-d1415c68c0ad7ac244aedaa9358215caf30c0dc8.tar.gz conf-d1415c68c0ad7ac244aedaa9358215caf30c0dc8.zip |
page up in zsh should forward to tmux
Diffstat (limited to 'zshinput')
-rw-r--r-- | zshinput | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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 |