Tmux for Mere Mortals
71–80 of 171 posts
Re: Tmux for Mere Mortals
#72Earlier quoted context omitted.
My biggest problem with "mouseless tmux" was copy-paste. How do you deal with that?
Make your own cheatsheet for bindings you need. This way you learn faster and optimize for your own needs. Tmux is exceptional mouseless, though personally I prefer combining with mouse. With xclip, mouse and copy/paste can work over SSH-forwarded X-sessions with C-y and Enter from copy-mode-vi so: # For older versions of tmux: #setw -g mode-mouse on #set -g mouse-resize-pane on #set -g mouse-select-pane on #set -g m…
# For tmux 2.6+
set -s set-clipboard externalRe: Tmux for Mere Mortals
#73Earlier quoted context omitted.
> realizing it was never going to work how I liked. > You can't have it all with the mouse no matter your settings > so I went back to just using the cursor to move things around. These tools (vim, tmux, etc.) work great for mouseless setups. If you can get comfortable with a 100% keyboard control paradigm, it might work for you. I realize this might not be what you want, but if the statement "spend less time moving…
My biggest problem with "mouseless tmux" was copy-paste. How do you deal with that?
Re: Tmux for Mere Mortals
#74Re: Tmux for Mere Mortals
#75Earlier quoted context omitted.
My biggest problem with "mouseless tmux" was copy-paste. How do you deal with that?
I haven't got my config to hand, but essentially I've binded leader-y and leader-p to copy and paste respectively both using the system clipboard. Since doing that tmux has been so much more useful to me.
Re: Tmux for Mere Mortals
#76Spent too much time wonking a tmux config only realizing it was never going to work how I liked. You can't have it all with the mouse no matter your settings, there will always be a compromise. It also doesn't help that no one cites the version of tmux they wrote their configs for, nor that the configs are not backwards compatible with all versions of tmux for all settings. It's really clunky, but I went from tmux to…
Re: Tmux for Mere Mortals
#77After a few years in tmux, I actually moved back to just iterm2 (I'm always on osx). There are many new Iterm2 features over the last few years that make tmux unecessary IMO. - Iterm2 can now restore sessions, even partially after a reboot (attempts to recreate workspaces). This was the main benefit of tmux for me. - Iterm2 can also have a visual mode to browse your scrollback buffer, and there are some shortcuts sim…
Re: Tmux for Mere Mortals
#78Earlier quoted context omitted.
You can configure tmux to synchronize with the X clipboard, although it is somewhat fiddly because of how terminal emulators work. See this page: https://github.com/tmux/tmux/wiki/Clipboard In most terminal emulators you can also use Shift (or sometimes a different modifier) to bypass application mouse mode and have the terminal emulator handle the mouse event. Of course you can't copy out of the history with this, b…
> that is another limitation of terminal emulators. This seems more an excuse than a cause. When the "mouse mode" of tmux is off, the copy-paste mechanism works perfectly. There is no reason why this couldn't still be the case when the mouse mode is on. For example, tmux could enable the mouse only for scrolling and resizing the panes, while keeping the correct copy paste behavior intact. But it chooses not to.
Re: Tmux for Mere Mortals
#79Spent too much time wonking a tmux config only realizing it was never going to work how I liked. You can't have it all with the mouse no matter your settings, there will always be a compromise. It also doesn't help that no one cites the version of tmux they wrote their configs for, nor that the configs are not backwards compatible with all versions of tmux for all settings. It's really clunky, but I went from tmux to…
I don't think this is correct; it's just that it's not trivial to get things working well. As you say, it depends on using an up-to-date version of tmux (and sadly, you often can't run a config made for a new version with an older version of tmux). And you'll need your terminal to be up to the task (eg. iTerm2 on macOS; not sure what the best thing on Linux would be).
This config shows some useful mouse settings, along with transparent integration with system clipboard via Clipper (even when running tmux on a remote host):
https://github.com/wincent/wincent/blob/81e4b5dc180dd22d8b47...
But like I said, getting it all working nicely requires a bit of work, especially if you want things to work uniformly across Vim, tmux and the shell. Once you've got it all working though, it's great. I can scroll with trackpad or mouse wheel inside and outside of Vim, click or drag to select text (and double-click to select words, triple-click to select lines) both inside and outside of Vim, I can drag tmux or Vim splits etc.
Having sad that, I rarely need or want to take my hands off the keyboard when in the terminal nowadays.
Re: Tmux for Mere Mortals
#80Earlier quoted context omitted.
> realizing it was never going to work how I liked. > You can't have it all with the mouse no matter your settings > so I went back to just using the cursor to move things around. These tools (vim, tmux, etc.) work great for mouseless setups. If you can get comfortable with a 100% keyboard control paradigm, it might work for you. I realize this might not be what you want, but if the statement "spend less time moving…
My biggest problem with "mouseless tmux" was copy-paste. How do you deal with that?
bind -Tcopy-mode-vi MouseDragEnd1Pane copy-pipe-and-cancel "if [ \"$(uname)\" = 'Darwin' ]; then pbcopy; else xclip; fi"
to achieve the same thing. It also looks like you can configure copy commands to pipe to a command of your choice with the upcoming version of tmux without having to override keybindings [3].[1]: >= 2.4, maybe?
[2]: Any terminal that supports OSC52 (e.g, iTerm2)
[3]: https://github.com/tmux/tmux/commit/5aba26f2cb7aa9609a3c3d2b...