![]() It scrolls by 5 rows, which feels like a big jump. Read my previous part of “tmux in practice” series for more details: tmux in practice: iTerm2 and tmux integration.Īnother tmux’s default I would prefer to change is the mouse wheel scroll. So ⌘↑ pressed in iTerm just sends M-Up keystroke to tmux session. It’s possible by using custom iTerm profile with some keybindings overridden to trigger tmux actions. Moreover, even when I’m inside tmux session, I can still continue using ⌘↑ and ⌘↓ to control the inner tmux scrollback buffer, rather that iTerm’s one. # Scroll up/down by 1 line, half screen, whole screenbind -T copy-mode-vi M-Up send-keys -X scroll-upbind -T copy-mode-vi M-Down send-keys -X scroll-downbind -T copy-mode-vi M-PageUp send-keys -X halfpage-upbind -T copy-mode-vi M-PageDown send-keys -X halfpage-downbind -T copy-mode-vi PageDown send-keys -X page-downbind -T copy-mode-vi PageUp send-keys -X page-up The usual PageDown and PageUp controls are available to scroll by whole screen, and extra M-PageDown and M-PageUp to scroll by a half of screen (really convenient). ![]() Once you’re in copy mode, you can continue pressing M-Up to scroll 1 line up. I’ve gotten used to ⌘↑ to start scrolling in iTerm, and I’ve added following root keybinding: # trigger copy mode bybind -n M-Up copy-mode ![]() Personally, I use tmux scrollback without hacks above, but tweak it’s configuration to be more friendly and familiar.įirst of all, I don’t like prefix,[ to enter copy mode. And when you detach/close a tmux session, the parent terminal is polluted with tmux window’s output. ![]() However, this solution is limited to having tmux session with 1 window and 1 pane only. Some people who find this annoying - configure tmux scrollback buffer to be allowed to be shown up in parent terminal scrollback buffer - so they can just use familiar scrolling controls. The solution is to use tmux specific controls to access its own scrollback buffer: Ctrl-b then [ to enter copy mode, use Down/Up arrows or PageDown and PageUp keys, q or Enter to exit copy mode. In practice, if you get used to scroll back using ⌘↑ in your iTerm and if you’re going to do the same inside running tmux session, you will control and scroll the outer iTerm’s scrollback buffer, rather than the tmux’s inner scrollback buffer. When you close your full-screen app, you get back to the same state when you launched the app and don’t see output from inside the app any more.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |