5 ms·
There is one thing I want from my terminal multiplexer: working scroll functionality with Shift+PgUp/PgDn, even in split screens, just like in a plain console,
by elpocko 10y ago
There is one thing I want from my terminal multiplexer: working scroll functionality with Shift+PgUp/PgDn, even in split screens, just like in a plain console, without messing everything up. Is that possible?
- hbogert 10y agoByobu does this in my case with default settings, just with alt+pg-up/down
- elpocko 10y agoHey, I just tried that and it's pretty close to what I want. Thank you. edit: close, but no cigar. It enters "scrollback mode", which you have to exit before you can type again. It's just like screen's copy mode with different key bindings.
- CaptSpify 10y agoKind of. I use bind-key -t vi-copy "J" page-down bind-key -t vi-copy "K" page-up Then I can just enter tmux's vi mode, and scroll up and down with shift-J/K. I don't know of a way to bind shift-PgUp/PgDn though, which sounds like what you are looking for.
- rhinoceraptor 10y agoYou do one better - tmux's mouse mode allows you to scroll with your mouse wheel. Just add 'set -g mouse on' to your ~/.tmux.conf. You can configure the history size limit by setting 'set-option -g history-limit <lines>'. When you scroll the mouse wheel, tmux will enter copy mode and scroll.
- elpocko 10y agoThat is absolutely not 'better', sorry. Taking your hands off the keyboard to do something basic is never better.
- coldtea 10y agoI disagree. I want to select with the mouse and touch type with the keyboard. And "doing it faster" is never a concern. As a programmer I write about 5% of what I could type in the same time as a secretary or accountant. Most of the work is thinking. Plus, the occasional chance to get your hands off of the rigid (and carpal tunnel inducing) pose on the keyboard and move them to the mouse, or vice versa, is welcome. I don't want to replicate things the mouse does better with keyboard shortcuts, or suffer "modal" input-modes in my programs.
- elpocko 10y agok I still prefer not using the mouse for a basic operation like scrolling, thank you.
- pmoriarty 10y agoI myself prefer to scroll with the keyboard in tmux, but for moving the cursor and selecting text, tmux has a very, very long way to go before being optimally efficient and useful in this regard. The kings of keyboard-based cursor movement and text selection are vim and emacs, both of which have a very rich and powerful toolbox of techniques and plugins that help the user do that quickly and efficiently. For example, emacs has plugins like ace-jump-mode which lets you jump the cursor to any precise position on the screen by typing just one or two keystrokes. vim has similar plugins, like easy-motion and precisejump. vim and emacs also have quick ways to select words, sentences, paragraphs, functions, lines, logical and visual blocks, the entire document, etc. This includes having full access to rich and powerful regex text matching, which can be used for selection. In contrast to emacs and vim, when I try to move my cursor and select text in tmux, I feel crippled. So sometimes I do succumb to the temptation of using the mouse to select text in tmux, despite being quite comfortable and satisfied in using the keyboard exclusively in vim and emacs.
- pmoriarty 10y agoDoes it absolutely have to be a combination of Shift and PgUp/PgDn? With tmux, you can type your prefix key followed by PgUp and it will scroll up, even in split screens. For example, if your prefix key is Control-b, you would type Control-b PgUp and get the effect you want.
- elpocko 10y agoI'd like to use the same key combination, no matter if I'm in screen/tmux or not.
- williamdclt 10y agothe bind -n command allow to bind keys without the prefix. For example, I use the following to resize panes without using the prefix : bind -n M-h resize-pane -L 5 bind -n M-j resize-pane -D 5 bind -n M-k resize-pane -U 5 bind -n M-l resize-pane -R 5
- destructionator 10y agoI wrote my own terminal emulator and screen-like program to get there... I made mine send the code for shift+pageup/down when the application is in alternative screen mode, so I could forward the keypress all the way down to the server...