Hey there, terminal enthusiasts! It’s not uncommon to find ourselves neck-deep in lines of code or lengthy log files when working in a terminal session. As much as we love Tmux for managing our terminal sessions, navigating through the long scrolls can sometimes feel like a chore, can’t it? That’s precisely why I’m here today. In this post, I’m going to show you how to set the scroll speed in Tmux, making your scrolling more efficient and less tiring. So, let’s not waste any more time and dive right in!
Fresh to Tmux? Start smart with the fundamentals of Tmux. Already a Tmux pro? Let’s cut to the chase!
Setting scroll speed in Tmux by binding keys of wheel-up and wheel-down
Open ~/.tmux.conf
file using vim
or your preferred text editor.
vim ~/.tmux.conf
Then, append the following config in the ~/.tmux.conf
file
set -g mouse on
set-option -g status-keys vi
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi WheelUpPane send-keys -X halfpage-up
bind-key -T copy-mode-vi WheelDownPane send-keys -X halfpage-down
Now save the file. In case of vim
, its ESC
+ :wq
+ ENTER
.
Let’s say you have made changes to tmux.conf
file by adding or changing default config, you have to reload the config so that the changes reflects in your terminal. The command to reload config is called source-file
.
You have to reload tmux.conf
so that it reflects-
tmux source-file ~/.tmux.conf
If you are inside a tmux session, you can run the command inside the tmux session to source the config file-
Ctrl-B
:
source-file ~/.tmux.conf
I hope you found this article useful, glad that you found it easy to reload or source config in Tmux. That’s a wrap, folks! Now you know how to set the scroll speed in Tmux. It’s always these little tweaks that make our working environments feel personalized and efficient, isn’t it? Remember, Tmux is highly customizable, and there’s always room for improvement. So, don’t stop here; continue to explore and experiment with the many options Tmux provides. I hope you found this guide helpful, and don’t forget to stick around for more Tmux hacks!
You can also check out the complete tmux cheatsheet of keyboard shortcuts and mouse shortcuts.