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