1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-20 10:53:23 -07:00

handle Home and End keys

This commit is contained in:
Connor Olding 2019-06-05 19:09:14 -07:00
parent 97663248ba
commit 8c4f76a583
2 changed files with 12 additions and 1 deletions

View File

@ -31,10 +31,13 @@ set -g display-time 2500
# jump into copy-mode for Shift+PgUp, scroll half a page instead of a full page
# switching modes is not ideal but it's the only way to scroll within tmux
bind -n S-PgUp copy-mode \; send-keys -X halfpage-up
bind -n S-Home copy-mode \; send-keys -X history-top
# bind Shift+PgUp/PgDn to Do The Right Thing™
# bind Shift+PgUp/PgDn/Home/End to Do The Right Thing™
bind -T copy-mode-vi S-PgUp send-keys -X halfpage-up
bind -T copy-mode-vi S-PgDn send-keys -X halfpage-down
bind -T copy-mode-vi S-Home send-keys -X history-top
bind -T copy-mode-vi S-End send-keys -X history-bottom
# Ctrl+PgUp/PgDn to navigate windows (like web browsers)
bind -n C-PgUp previous-window

View File

@ -248,6 +248,14 @@ Inn <silent> <c-s-down> :m+1<cr>
Inn <silent> <c-s-PageUp> :tabm -1<cr>
Inn <silent> <c-s-PageDown> :tabm +1<cr>
" jump to top and bottom
Inn <c-Home> gg
Inn <c-End> G
nn <Esc>[1;5H gg
nn <Esc>[1;5F G
ino <Esc>[1;5H <c-o>gg
ino <Esc>[1;5F <c-o>G
" hide search highlighting
Inn <silent> <c-]> :nohls<enter>