5 ms·
When I was a Vim user, tmux was always the first thing I ran when connecting to a machine… But the after moving to Emacs and using Tramp for remote sessions, f
by alfiedotwtf 1y ago
When I was a Vim user, tmux was always the first thing I ran when connecting to a machine…
But the after moving to Emacs and using Tramp for remote sessions, followed by VS Code with its built-in session management, I never feel the need to even leave the editor let along manage sessions
- jnpnj 1y agoI just found out about https://stackoverflow.com/a/52838493 https://stackoverflow.com/a/52838493 Host myhost Hostname host User user RequestTTY yes RemoteCommand tmux new -A -s foobar
- homebrewer 1y agoThis breaks rsync & many other things that rely on SSH as transport. Try: alias ssh="ssh -o RequestTTY=force -o RemoteCommand='tmux new -A -s foobar'"
- idatum 1y agoOr just use a different myhost, like "t-myhost" (i.e. myhost != hostname)?
- homebrewer 1y agoWhich would require creating a couple of hundred (in my case) duplicate host aliases instead of adding one shell alias that can be used with any host, including those not mentioned in ~/.ssh/config.
- godelski 1y agoYou can resolve this with a conditional. See the `Match` keyword. Though I agree, probably not the best solution to start all sessions with tmux. There's other issues it can cause.
- burnt-resistor 1y agoNo, host matches allow wildcards.
- burnt-resistor 1y agoI use an ssh virtual host pattern *-tmux to copy over an ssh-specific tmux.conf to a remote host before connect and then connect to it with -f tmux-ssh.conf. I can also connect to a host directly without tmux stuff by omitting the -tmux suffix.
- burnt-resistor 1y agoPlease don't do this. Do something like instead except don't call it .tmux.conf, use .tmux-ssh.conf and -f: https://stackoverflow.com/a/66709528 https://stackoverflow.com/a/66709528
- valcron1000 1y agoHow do you deal with persistent sessions in VSCode? I have a remote VM to which I connect through SSH using VSCode, but I need to have certain programs running even after I disconnect from the VM. It's the only reason why I use tmux and I haven't been able to get rid of it.
- alfiedotwtf 1y agoVS Code has a server on the machine you’re connecting to that holds state… that’s what I’m guessing
- EPendragon 1y agoFor me the value in using a tool like tmux is that it remains scriptable - startup scripts - and could be used in conjunction with other cli tools. The same applies to Vim/Neovim. Both of these tools remain unrivaled in regards to combining them with other flows and pipelines.