On the server, put this snippet in ~/.bashrc to automatically open tmux on ssh
# Open Tmux Session immediately on SSH and exit SSH Session when exiting tmux
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux;
exit;
fi
Add set -sg escape-time 5
to your ~/.tmux.conf
and then reload (via <leader> :source-file ~/.tmux.conf
) tmux and now mode switching in editors like vim and helix won't be laggy!
Info from https://superuser.com/questions/252214/slight-delay-when-switching-modes-in-vim-using-tmux-or-screen
Combine this with the VS Code Remote-SSH extension for easy VM-based dev