Tmux vs iTerm tabs and panes
Hi, I'm using Mac + iTerm + Zsh + Vim as my primary setup and wonder whether Tmux can fit in. I've learned basics of tmux. But when I try to put it in use, I feel it hurts my productivity. I listed the pros and cons I felt against Tmux vs iTerm and wonder if there are good solutions or workarounds for the problems I had with Tmux. Any feedback will be highly appreciated. 1. Tmux pros Workspace persistence Customizability Can use keyboard for everything cons Extra steps required when starting/stopping terminal (iTerm has tmux integration, I'm not sure how good it works) Require two key strokes for operations like switching to tabs and panes Copy/paste between vim, tmux and os 2. iTerm pros Quick switch between tabs and panes cons Workspace persistence Thank you. Guoliang Cao-- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: Tmux vs iTerm tabs and panes
Thank you very much. It seems except the copy/paste could not be handled seamlessly, my other two problems can be solved. I'll give it another try. - Cao On Dec 20, 2012, at 7:10 PM, Adrian Luff wrote: > I use Terminal.app + bash + MacVim + tmux daily. Here are some suggestions. > > Startup > Not sure what you're referring to in regards to extra steps. You can setup > iTerm or Terminal.app to start tmux as your default shell via a new profile. > You can also launch it with a simple "tmux" command if you alias tmux to: > tmux attach || tmux new > You can set up Window Groups in Terminal (and iTerm2 I believe) to open a > collection of windows as you please. If you don't want to create custom > profies you could use Applescript to open the Terminal / iTerm2 windows with > the tmux sessions you need. > > Clipboard > To use system clipboard for vim add to .vimrc: set clipboard=unnamed > To yank from tmux clipboard into system clipboard add to .tmux.conf: bind-key > y run "tmux save-buffer - | reattach-to-user-namespace pbcopy" > Note that this requires one extra step. From tmux copy-mode you copy to the > save-buffer then from tmux normal mode you copy the tmux save-buffer to the > system clipboard with pbcopy. > Generally if I need to copy something small I use the mouse to select, then > copy and paste without invoking tmux. > For larger jobs I typically save the buffer to a file rather than copying > text using: bind-key G pipe-pane "cat > $HOME/tmux-#T" > > Tabs, sessions windows, panes > I generally use tmux within every tab. I have multiple tabs within > Terminal.app. Using ⌘-{ and ⌘-} I switch easily between tabs. I have tmux > configured (through some bash code) to create a grouped session in tmux if I > attach with multiple clients to the same server. This allows me to view > different (or the same) tmux windows in different Terminal.app tabs. The > basic command is: tmux new-session -t new-session-name -s source-session-name > Switching between tmux windows (or panes) is two keystrokes by default. You > can map commands directly (meaning no prefix required). However, that means > those keys cannot be used for anything else in your Terminal programs (like > vim). For example, you can bind Control-1 (^1) to select tmux window 1 with: > bind-key -n C-1 select-pane -t 1 > Personally I've remapped my caps lock key to control via System Preferences > -> Keyboard -> Modifier Keys and mapped my tmux prefix to ^A. I can press > that very easily so two keystrokes to switch tmux windows isn't a bother. > > -Adrian > > On Dec 20, 2012, at 11:49 AM, gca...@gmail.com wrote: > >> Hi, >> >> I'm using Mac + iTerm + Zsh + Vim as my primary setup and wonder whether >> Tmux can fit in. I've learned basics of tmux. But when I try to put it in >> use, I feel it hurts my productivity. I listed the pros and cons I felt >> against Tmux vs iTerm and wonder if there are good solutions or workarounds >> for the problems I had with Tmux. Any feedback will be highly appreciated. >> >> 1. Tmux >> pros >> Workspace persistence >> Customizability >> Can use keyboard for everything >> >> cons >> Extra steps required when starting/stopping terminal (iTerm has tmux >> integration, I'm not sure how good it works) >> Require two key strokes for operations like switching to tabs and panes >> Copy/paste between vim, tmux and os >> >> 2. iTerm >> pros >> Quick switch between tabs and panes >> >> cons >> Workspace persistence >> >> Thank you. >> >> Guoliang Cao >> -- >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >> Remotely access PCs and mobile devices and provide instant support >> Improve your efficiency, and focus on delivering more value-add services >> Discover what IT Professionals Know. Rescue delivers >> http://p.sf.net/sfu/logmein_12329d2d___ >> tmux-users mailing list >> tmux-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/tmux-users > -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: Tmux vs iTerm tabs and panes
On Dec 20, 2012, at 6:34 PM, Thomas Adam wrote: > Hi, > > On Thu, Dec 20, 2012 at 02:49:59PM -0500, gca...@gmail.com wrote: >> Hi, > > (Another gratuitous use of gq} in Vim; please try and get your mailer to > wrap its lines to something sane...) > >> I'm using Mac + iTerm + Zsh + Vim as my primary setup and wonder whether >> Tmux can fit in. I've learned basics of tmux. But when I try to put it in >> use, I feel it hurts my productivity. I listed the pros and cons I felt >> against Tmux vs iTerm and wonder if there are good solutions or >> workarounds for the problems I had with Tmux. Any feedback will be highly >> appreciated. >> >> 1. Tmux pros Workspace persistence Customizability Can use keyboard for >> everything >> >> cons Extra steps required when starting/stopping terminal (iTerm has tmux >> integration, I'm not sure how good it works) Require two key strokes for >> operations like switching to tabs and panes Copy/paste between vim, tmux >> and os > > Are you referring to tmux using a prefix key to denote the start of most of > its operations? This is no different to Vim or EMACS, say, and for a > terminal program, tmux has to do this given the large array of keys most > people _have_ to type; so tmuxx tries not to get in the way. That said, if > you're able to find a set of keys which don't interfere day-to-day, you > always have the option of using "bind -n" to not require a prefix key. That's what I was looking for to set up some hot keys for quick window/pane switching etc. Thanks, Cao > > I don't own a Mac, and hence do not know anything about iterm2 so I can't > answer those bits. > > -- Thomas Adam -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: Tmux vs iTerm tabs and panes
I was looking for solutions to pain points I felt. Adrian and Thomas have replied with suggestions. If only copy/paste could seamless work with os clipboard, like "set clipboard=unnamed" in vim, it'll be perfect! Regards, Cao On Dec 21, 2012, at 5:04 AM, Nicholas Marriott wrote: > I'm not sure what you want here, we can't really tell you how to fit > tmux into your workflow. Are you looking for suggestions? Making > suggestions? Just complaining? > > > > On Thu, Dec 20, 2012 at 02:49:59PM -0500, gca...@gmail.com wrote: >> Hi, >> I'm using Mac + iTerm + Zsh + Vim as my primary setup and wonder whether >> Tmux can fit in. I've learned basics of tmux. But when I try to put it in >> use, I feel it hurts my productivity. I listed the pros and cons I felt >> against Tmux vs iTerm and wonder if there are good solutions or >> workarounds for the problems I had with Tmux. Any feedback will be highly >> appreciated. >> 1. Tmux >> pros >> Workspace persistence >> Customizability >> Can use keyboard for everything >> cons >> Extra steps required when starting/stopping terminal (iTerm has tmux >> integration, I'm not sure how good it works) >> Require two key strokes for operations like switching to tabs and panes >> Copy/paste between vim, tmux and os >> 2. iTerm >> pros >> Quick switch between tabs and panes >> cons >> Workspace persistence >> Thank you. >> Guoliang Cao > >> -- >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >> Remotely access PCs and mobile devices and provide instant support >> Improve your efficiency, and focus on delivering more value-add services >> Discover what IT Professionals Know. Rescue delivers >> http://p.sf.net/sfu/logmein_12329d2d > >> ___ >> tmux-users mailing list >> tmux-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/tmux-users > -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: Tmux vs iTerm tabs and panes
I was just wishing it could work like how vim worked. If it requires a lot of work and creates other problems, I'm totally ok with the workarounds. Thanks a lot for the hard work you put into tmux. I really appreciate it. - Cao On Dec 21, 2012, at 9:38 AM, Thomas Adam wrote: > On Fri, Dec 21, 2012 at 09:04:12AM -0500, gca...@gmail.com wrote: >> I was looking for solutions to pain points I felt. Adrian and Thomas have >> replied with suggestions. If only copy/paste could seamless work with os >> clipboard, like "set clipboard=unnamed" in vim, it'll be perfect! > > Even on Linux alone, there's no set way of doing this. XTerm allows for > selections made in its own window to enter the PRIMARY selection buffer, > which in this case tmux makes use of via escape sequences. The problem here > is that only XTerm supports those; I've yet to see *any* other terminal > emulator which does this (such as rxvt-unicode) which is odd, because some > of them even profess to emulating XTerm. > > So in that situation, many people end up using some form of xclip/xsel > option to do this -- but doing that won't necessarily work when trying to > put the contents in to GTK/QT applications (I use a program called > 'parcellite' to synchronise both selections/clipboards between > applications). That's just on Linux alone (and to some extent BSD). > There's no guarantee that any of those mechanisms will be available when > tmux loads. > > Look towards Mac for a moment, and that problem is even more annoying. I > think someone has written some wrapper program to allow for pb{copy,paste} > -- but that's a hack. > > Unlike Vim which adds a shit load of support code, trying to do this from > within tmux would bloat the osdep-* code significantly. > > So it's not really an option to support this "seamlessly" -- and AFAIK, > regardlee of how many people this annoys, they've all found some solution to > this which works, even if it's resorting to using the terminal's own > selection mechanism via "shift". > > -- Thomas Adam -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users