tmux seems to need extra yak shaving to get vim integration, copy/paste and scrollback configured nicely and I just couldn't see the benefit over iTerm's native functionality.
Can anyone sell me on tmux over iTerm for local dev?
tmux seems to need extra yak shaving to get vim integration, copy/paste and scrollback configured nicely and I just couldn't see the benefit over iTerm's native functionality.
Can anyone sell me on tmux over iTerm for local dev?
I also use it along tmuxinator, which is very convenient to setup sessions. I just need to type "tmuxinator my-project" and it opens the tabs and layouts in the right directories for this project, with "tail -f" running in some panes, mysql client in others, an SSH connection in yet another. Tmuxinator makes configuring all this very straightforward.
Scrollback was a bit annoying at first but I got used to it and it's no longer an issue. Copy and paste can indeed still be an issue especially when sshing to a server.
Butter-smooth scrolling as you hold down j in vim. Doesn't have its own scrollback, so use tmux just for that. There is so much less TUI lag, it's on par with using a regular GUI text editor.
https://gist.github.com/sijad/771426b3995eb05faeb6d78926645e...
Found in https://github.com/jwilm/alacritty/issues/146
Alacritty might get mouse modifiers to use its own text selection (better for a remote session), but that's good enough for me.
I use, for extra vim niceness:
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" tmux -CC attach || tmux -CC
This is one of my favorite things about iTerm! Combine that with custom profiles for each server and automatic profile switching (and a few other gems), and working remotely is scarcely harder than working locally!The vim stuff is not too hard to get around IIRC. I don't remember the details, but you can have a look at my .vimrc [0] if you want an example that works on remote servers through tmux with iterm.
[0] https://github.com/stefco/dotfiles/blob/master/linkfiles/.vi...
I'm not fully versed in what iTerm can do but tmux does splits and tabs. The tabs are very useful. I can also use tmuxinator so I can start up with a standard set of splits and tabs very quickly.
There are the issues you mentioned. But once it's configured I don't find those troubling. And once you change the prefix to something sane it's really nice to use. I enjoy moving around tmux. So for me there are big benefits and tmux is one of the first things I install on a new machine.