Hacker News new | ask | show | jobs
by gingerlime 4500 days ago
Isn't one of the advantages of tmux is reduce / avoid using the mouse?

I know that scrolling is one of the first non-obvious changes that seem irritating at first. But after you get used to scrolling with the keyboard, I find myself missing this possibility on 'standard' terminal windows.

Suddenly using the mouse to scroll feels really awkward and inefficient.

7 comments

I think I can live without scrolling, but what I found most irritating when trying tmux is selecting / copying / pasting things. ATM I use iterm with split panes and a 'quake-style' dropdown terminal; tbh it works well enough for me.
you can scroll just fine in tmux, in fact better because you can search in your scroll back. <c-b>[

as for selecting copying pasting. i use these options

    set -g mouse-resize-pane on
    set -g mouse-select-pane on
i can now select and resize panes with the mouse, and i can select while holding the option key on the keyboard.

also if you set

    setw -g mode-mouse on
you can scroll back with the mouse in the scroll back buffer without having to press c-b[ and it will still properly scroll everywhere else... vim/weechat/etc.

on a mac, iterm2 does this natively(in linux it works anyway). but if you want to use that in terminal or totalterminal(quake term) you'll need to install mouseterm. I recommend using mouseterm-plus as i recall mouse term is no longer maintained.

edit: looks like the link is dead you'll have to build it yourself https://github.com/saitoha/mouseterm-plus

If you happen to be copying with the mouse, tmux has prefix + z, which expands your current pane to fill the screen. prefix + z returns the screen layout to it's former self. Makes the need to copy easy regardless of layout.
Why can't you have both efficient mouse AND keyboard control?

Sometimes your hand is on the mouse and it makes for sense to use it.

You might like Plan 9.
Depends. If you have a ThinkPad with a TrackPoint-style mouse, it's actually really convenient having a mouse in the home row. Hold the middle button and scroll up/down easily.
Really? I find a quick scroll of the mouse wheel easier. Also when scrolling back a few hundred (or thousand lines), grabbing the scroll bar and finding where I want to be I find much faster.

I don't mind people who don't want to use the mouse, that's fine, but personally I sometimes don't run tmux when I know it will upset my scrolling and cut+pasting.

C-b [ + C-r <string> is pretty awesome when you know what you're looking for in the search history... Though I definitely use wheel scrolling when I don't remember exactly what I'm looking for or looking at log output.
I don't understand what are you talking about. In almost every linux terminal you can scroll with PageUp/Down and with mouse on most X ones(ex.: rxvt, xfce-terminal). In tmux one can press ctrl+b -> PageUp and scroll with keyboard or mouse.

edit: corrected hotkeys

There are other benefits to having GUI integration to your terminal emulator. One of which is discovery of features. I personally find it easier sometimes to discover new features that are available in a context menu as opposed to reading an entire MAN page.
Mouse vs keyboard: I navigate with whatever my hand is on at the moment.