After 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…
Don't forget about iterm2's tmux integration. It makes both local tmux and tmux over ssh appear like regular tmux panes. No more bizarre keybindings and tmux configs - it just works.
Tmux for Mere Mortals
91–100 of 171 posts
Re: Tmux for Mere Mortals
#92This is nice in isolation, but it becomes powerful if you have a persistent target and have a keybinding to issue a send-keys command to the persistent target.
For instance, in my vimrc, I have a set of commands bound like so:
noremap R :silent !tmux send-keys -t 2.2 startjob Enter
noremap E :silent !tmux send-keys -t 2.2 killjob Enter
where startjob is a local alias to starting my development environment and 2.2 is the target.
This means from any of the vim instances I have, I can start and stop my development environment without having to do so in a running vim instance, and get all the appropriate logging in a terminal that I can switch to when I choose.
This becomes even more powerful with a build script I have triggered by an inotifywait that's running in 2.1 that will build my entire environment with all its dependencies (yes, I need to do it this way because building one project may require another to be rebuilt, and just triggering 'make' in vim doesn't cut it) whenever a file is written.
It reduces a lot of the pain with developing a C++ project in the terminal and lets me get back to the work of just thinking about what needs to be done.
'Send-keys' is, to me, the killer feature of tmux.
Re: Tmux for Mere Mortals
#93If anyone is curious what it looks like to use tmux in your day to day, I made a video about this at: https://nickjanetakis.com/blog/using-tmux-sessions-windows-p... It covers how I use tmux sessions, windows and splits along with Vim buffers / splits / tabs to manage my work flow for developing applications and switching to different projects within seconds. Despite the video being almost a year old, I work in the e…
Re: Tmux for Mere Mortals
#94What this author has settled on looks very similar to commonly used tiling window manager shortcuts (which should not be very surprising, because a lot of the constraints desired by the author apply to the other situation also). In fact, even more directly, the author is basically using TMUX as a the tiling window manager for their terminals. So, I guess the funny thing is, this gives a nice bunch of Tmux shortcuts,…
Re: Tmux for Mere Mortals
#95Earlier quoted context omitted.
Don't forget about iterm2's tmux integration. It makes both local tmux and tmux over ssh appear like regular tmux panes. No more bizarre keybindings and tmux configs - it just works.
Wait, what? I didn’t know this existed! Thanks for informing me :)
tmux -CCRe: Tmux for Mere Mortals
#96Re: Tmux for Mere Mortals
#97After 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…
If you're disconnected from the server while some program is running, this program will receive HUP signal. I don't really like this fact and that's the only reason I'm using tmux for any important programs.
Re: Tmux for Mere Mortals
#98If anyone is curious what it looks like to use tmux in your day to day, I made a video about this at: https://nickjanetakis.com/blog/using-tmux-sessions-windows-p... It covers how I use tmux sessions, windows and splits along with Vim buffers / splits / tabs to manage my work flow for developing applications and switching to different projects within seconds. Despite the video being almost a year old, I work in the e…
In the video, are you ssh'd into three servers, or are all of the projects local, or some combination?
Re: Tmux for Mere Mortals
#99Earlier quoted context omitted.
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.
I've always wanted something like that, can you please share your config?
#makes clipboard work
set-option -g default-command "reattach-to-user-namespace -l fish"
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"
Re: Tmux for Mere Mortals
#100Earlier quoted context omitted.
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 Windows vcxsrv is the simplest and most fool-proof X-Windows server. Anything else on Windows may result in pain." X servers on Windows are often a bigger cut/paste barrier than tmux. As you mention, vcxsrv seems to work better than other choices. Note there are some cut/paste/clipboard options you have to set.